@campxdev/react-native-blueprint 0.1.3 → 0.1.6

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 (157) hide show
  1. package/README.md +153 -69
  2. package/lib/module/app/_layout.js +7 -1
  3. package/lib/module/app/_layout.js.map +1 -1
  4. package/lib/module/components/ui/Accordion.js.map +1 -1
  5. package/lib/module/components/ui/Alert-Dialog.js +2 -2
  6. package/lib/module/components/ui/Alert-Dialog.js.map +1 -1
  7. package/lib/module/components/ui/Alert.js +2 -2
  8. package/lib/module/components/ui/Alert.js.map +1 -1
  9. package/lib/module/components/ui/AppBar.js.map +1 -1
  10. package/lib/module/components/ui/Avatar.js +3 -3
  11. package/lib/module/components/ui/Avatar.js.map +1 -1
  12. package/lib/module/components/ui/Bottom-Sheet.js +9 -2
  13. package/lib/module/components/ui/Bottom-Sheet.js.map +1 -1
  14. package/lib/module/components/ui/Context-Menu.js +24 -24
  15. package/lib/module/components/ui/Context-Menu.js.map +1 -1
  16. package/lib/module/components/ui/Custom-Card.js +6 -2
  17. package/lib/module/components/ui/Custom-Card.js.map +1 -1
  18. package/lib/module/components/ui/Dialog.js +3 -3
  19. package/lib/module/components/ui/Dialog.js.map +1 -1
  20. package/lib/module/components/ui/Dropdown-Menu.js +3 -3
  21. package/lib/module/components/ui/Dropdown-Menu.js.map +1 -1
  22. package/lib/module/components/ui/Input.js +3 -2
  23. package/lib/module/components/ui/Input.js.map +1 -1
  24. package/lib/module/components/ui/Menubar.js +4 -4
  25. package/lib/module/components/ui/Menubar.js.map +1 -1
  26. package/lib/module/components/ui/Native-Only-Animated-View.js.map +1 -1
  27. package/lib/module/components/ui/NavBar.js.map +1 -1
  28. package/lib/module/components/ui/Progress.js +2 -2
  29. package/lib/module/components/ui/Progress.js.map +1 -1
  30. package/lib/module/components/ui/Select.js +3 -3
  31. package/lib/module/components/ui/Select.js.map +1 -1
  32. package/lib/module/components/ui/Separator.js +2 -2
  33. package/lib/module/components/ui/Separator.js.map +1 -1
  34. package/lib/module/components/ui/Skeleton.js +2 -2
  35. package/lib/module/components/ui/Skeleton.js.map +1 -1
  36. package/lib/module/components/ui/Slider.js +7 -2
  37. package/lib/module/components/ui/Slider.js.map +1 -1
  38. package/lib/module/components/ui/Table.js +2 -2
  39. package/lib/module/components/ui/Table.js.map +1 -1
  40. package/lib/module/components/ui/Text.js.map +1 -1
  41. package/lib/module/components/ui/Textarea.js +3 -2
  42. package/lib/module/components/ui/Textarea.js.map +1 -1
  43. package/lib/module/components/ui/Theme-Toggle.js +3 -3
  44. package/lib/module/components/ui/Theme-Toggle.js.map +1 -1
  45. package/lib/module/components/ui/Toast.js +2 -2
  46. package/lib/module/components/ui/Toast.js.map +1 -1
  47. package/lib/module/index.js +4 -0
  48. package/lib/module/index.js.map +1 -1
  49. package/lib/module/lib/slot-helpers.js +19 -0
  50. package/lib/module/lib/slot-helpers.js.map +1 -0
  51. package/lib/module/types/components.d.js +4 -0
  52. package/lib/module/types/components.d.js.map +1 -0
  53. package/lib/module/types/global.d.js +5 -0
  54. package/lib/module/types/global.d.js.map +1 -1
  55. package/lib/module/types/rn-primitives.d.js +56 -1
  56. package/lib/module/types/rn-primitives.d.js.map +1 -1
  57. package/lib/typescript/package.json +1 -0
  58. package/lib/typescript/src/app/_layout.d.ts +0 -1
  59. package/lib/typescript/src/app/_layout.d.ts.map +1 -1
  60. package/lib/typescript/src/components/ui/Accordion.d.ts.map +1 -1
  61. package/lib/typescript/src/components/ui/Alert-Dialog.d.ts +3 -26
  62. package/lib/typescript/src/components/ui/Alert-Dialog.d.ts.map +1 -1
  63. package/lib/typescript/src/components/ui/Alert.d.ts +3 -2
  64. package/lib/typescript/src/components/ui/Alert.d.ts.map +1 -1
  65. package/lib/typescript/src/components/ui/AppBar.d.ts +3 -3
  66. package/lib/typescript/src/components/ui/AppBar.d.ts.map +1 -1
  67. package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts +2 -8
  68. package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts.map +1 -1
  69. package/lib/typescript/src/components/ui/Avatar.d.ts +472 -337
  70. package/lib/typescript/src/components/ui/Avatar.d.ts.map +1 -1
  71. package/lib/typescript/src/components/ui/Badge.d.ts +9 -136
  72. package/lib/typescript/src/components/ui/Badge.d.ts.map +1 -1
  73. package/lib/typescript/src/components/ui/Bottom-Sheet.d.ts.map +1 -1
  74. package/lib/typescript/src/components/ui/Button.d.ts +12 -165
  75. package/lib/typescript/src/components/ui/Button.d.ts.map +1 -1
  76. package/lib/typescript/src/components/ui/Card.d.ts +7 -768
  77. package/lib/typescript/src/components/ui/Card.d.ts.map +1 -1
  78. package/lib/typescript/src/components/ui/Collapsible.d.ts +4 -33
  79. package/lib/typescript/src/components/ui/Collapsible.d.ts.map +1 -1
  80. package/lib/typescript/src/components/ui/Context-Menu.d.ts +6 -49
  81. package/lib/typescript/src/components/ui/Context-Menu.d.ts.map +1 -1
  82. package/lib/typescript/src/components/ui/Custom-Card.d.ts +7 -768
  83. package/lib/typescript/src/components/ui/Custom-Card.d.ts.map +1 -1
  84. package/lib/typescript/src/components/ui/Dialog.d.ts +4 -40
  85. package/lib/typescript/src/components/ui/Dialog.d.ts.map +1 -1
  86. package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts +7 -49
  87. package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts.map +1 -1
  88. package/lib/typescript/src/components/ui/Hover-Card.d.ts +2 -21
  89. package/lib/typescript/src/components/ui/Hover-Card.d.ts.map +1 -1
  90. package/lib/typescript/src/components/ui/Input.d.ts +5 -3
  91. package/lib/typescript/src/components/ui/Input.d.ts.map +1 -1
  92. package/lib/typescript/src/components/ui/Label.d.ts +2 -73
  93. package/lib/typescript/src/components/ui/Label.d.ts.map +1 -1
  94. package/lib/typescript/src/components/ui/Menubar.d.ts +6 -39
  95. package/lib/typescript/src/components/ui/Menubar.d.ts.map +1 -1
  96. package/lib/typescript/src/components/ui/NavBar.d.ts.map +1 -1
  97. package/lib/typescript/src/components/ui/Popover.d.ts +2 -19
  98. package/lib/typescript/src/components/ui/Popover.d.ts.map +1 -1
  99. package/lib/typescript/src/components/ui/Progress.d.ts.map +1 -1
  100. package/lib/typescript/src/components/ui/Select.d.ts +5 -26
  101. package/lib/typescript/src/components/ui/Select.d.ts.map +1 -1
  102. package/lib/typescript/src/components/ui/Separator.d.ts +2 -128
  103. package/lib/typescript/src/components/ui/Separator.d.ts.map +1 -1
  104. package/lib/typescript/src/components/ui/Skeleton.d.ts +4 -2
  105. package/lib/typescript/src/components/ui/Skeleton.d.ts.map +1 -1
  106. package/lib/typescript/src/components/ui/Slider.d.ts +2 -1
  107. package/lib/typescript/src/components/ui/Slider.d.ts.map +1 -1
  108. package/lib/typescript/src/components/ui/Table.d.ts +16 -6
  109. package/lib/typescript/src/components/ui/Table.d.ts.map +1 -1
  110. package/lib/typescript/src/components/ui/Text.d.ts +3 -74
  111. package/lib/typescript/src/components/ui/Text.d.ts.map +1 -1
  112. package/lib/typescript/src/components/ui/Textarea.d.ts +7 -3
  113. package/lib/typescript/src/components/ui/Textarea.d.ts.map +1 -1
  114. package/lib/typescript/src/components/ui/Theme-Toggle.d.ts +1 -128
  115. package/lib/typescript/src/components/ui/Theme-Toggle.d.ts.map +1 -1
  116. package/lib/typescript/src/components/ui/Toast.d.ts +3 -2
  117. package/lib/typescript/src/components/ui/Toast.d.ts.map +1 -1
  118. package/lib/typescript/src/components/ui/Toggle.d.ts +4 -4
  119. package/lib/typescript/src/components/ui/Toggle.d.ts.map +1 -1
  120. package/lib/typescript/src/components/ui/Tooltip.d.ts +2 -22
  121. package/lib/typescript/src/components/ui/Tooltip.d.ts.map +1 -1
  122. package/lib/typescript/src/index.d.ts +2 -0
  123. package/lib/typescript/src/index.d.ts.map +1 -1
  124. package/lib/typescript/src/lib/slot-helpers.d.ts +32 -0
  125. package/lib/typescript/src/lib/slot-helpers.d.ts.map +1 -0
  126. package/nativewind-env.d.ts +7 -0
  127. package/package.json +24 -7
  128. package/src/app/_layout.tsx +7 -1
  129. package/src/components/ui/Accordion.tsx +3 -1
  130. package/src/components/ui/Alert-Dialog.tsx +5 -3
  131. package/src/components/ui/Alert.tsx +7 -4
  132. package/src/components/ui/AppBar.tsx +6 -2
  133. package/src/components/ui/Avatar.tsx +10 -6
  134. package/src/components/ui/Bottom-Sheet.tsx +10 -2
  135. package/src/components/ui/Context-Menu.tsx +15 -4
  136. package/src/components/ui/Custom-Card.tsx +6 -1
  137. package/src/components/ui/Dialog.tsx +13 -3
  138. package/src/components/ui/Dropdown-Menu.tsx +8 -4
  139. package/src/components/ui/Input.tsx +12 -4
  140. package/src/components/ui/Menubar.tsx +13 -6
  141. package/src/components/ui/Native-Only-Animated-View.tsx +1 -1
  142. package/src/components/ui/NavBar.tsx +9 -3
  143. package/src/components/ui/Progress.tsx +4 -2
  144. package/src/components/ui/Select.tsx +18 -6
  145. package/src/components/ui/Separator.tsx +4 -2
  146. package/src/components/ui/Skeleton.tsx +5 -3
  147. package/src/components/ui/Slider.tsx +8 -2
  148. package/src/components/ui/Table.tsx +9 -7
  149. package/src/components/ui/Text.tsx +1 -6
  150. package/src/components/ui/Textarea.tsx +15 -4
  151. package/src/components/ui/Theme-Toggle.tsx +7 -3
  152. package/src/components/ui/Toast.tsx +6 -3
  153. package/src/index.tsx +4 -0
  154. package/src/lib/slot-helpers.ts +57 -0
  155. package/src/types/components.d.ts +38 -0
  156. package/src/types/global.d.ts +178 -4
  157. package/src/types/rn-primitives.d.ts +1403 -46
@@ -1,70 +1,1427 @@
1
- declare module '@rn-primitives/*' {
2
- import type { ReactNode } from 'react';
3
- import type { ViewProps } from 'react-native';
1
+ /**
2
+ * Type augmentations for @rn-primitives/* packages
3
+ * This adds className and children support to all primitive components
4
+ */
5
+
6
+ import type { ReactNode } from 'react';
7
+ import type { ViewStyle, TextStyle } from 'react-native';
8
+
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicAttributes {
12
+ className?: string;
13
+ children?: React.ReactNode;
14
+ }
15
+ }
16
+ }
17
+
18
+ // Augment the actual primitive exports
19
+ declare module '@rn-primitives/types' {
20
+ import type { ComponentPropsWithoutRef } from 'react';
21
+ import type {
22
+ Pressable,
23
+ Text as RNText,
24
+ View,
25
+ TextInput,
26
+ ScrollView,
27
+ } from 'react-native';
28
+
29
+ export type PressableRef = React.ElementRef<typeof Pressable>;
30
+ export type ViewRef = React.ElementRef<typeof View>;
31
+ export type TextRef = React.ElementRef<typeof RNText>;
32
+ export type TextInputRef = React.ElementRef<typeof TextInput>;
33
+ export type ScrollViewRef = React.ElementRef<typeof ScrollView>;
4
34
 
5
- export interface PrimitiveProps extends ViewProps {
35
+ export interface SlottableViewProps
36
+ extends ComponentPropsWithoutRef<typeof View> {
37
+ asChild?: boolean;
38
+ className?: string;
6
39
  children?: ReactNode;
40
+ style?: ViewStyle;
41
+ }
42
+
43
+ export interface SlottableTextProps
44
+ extends ComponentPropsWithoutRef<typeof RNText> {
45
+ asChild?: boolean;
7
46
  className?: string;
47
+ children?: ReactNode;
48
+ style?: TextStyle;
49
+ }
50
+
51
+ export interface SlottablePressableProps
52
+ extends ComponentPropsWithoutRef<typeof Pressable> {
8
53
  asChild?: boolean;
54
+ className?: string;
55
+ children?: ReactNode;
56
+ style?: ViewStyle;
9
57
  }
10
58
 
11
- export interface PrimitiveComponentProps {
59
+ export interface SlottableTextInputProps
60
+ extends ComponentPropsWithoutRef<typeof TextInput> {
61
+ asChild?: boolean;
62
+ className?: string;
63
+ children?: ReactNode;
64
+ style?: TextStyle;
65
+ }
66
+
67
+ export interface SlottableScrollViewProps
68
+ extends ComponentPropsWithoutRef<typeof ScrollView> {
69
+ asChild?: boolean;
70
+ className?: string;
71
+ children?: ReactNode;
72
+ style?: ViewStyle;
73
+ }
74
+
75
+ export interface ForceMountable {
76
+ forceMount?: true;
77
+ }
78
+
79
+ export interface PositionedContentProps {
80
+ align?: 'start' | 'center' | 'end';
81
+ side?: 'top' | 'bottom' | 'left' | 'right';
82
+ sideOffset?: number;
83
+ alignOffset?: number;
84
+ avoidCollisions?: boolean;
12
85
  children?: ReactNode;
13
86
  className?: string;
14
87
  }
15
88
  }
16
89
 
17
- // Augment specific primitive modules
18
- declare module '@rn-primitives/accordion' {
19
- import type { ReactNode } from 'react';
20
- export namespace Accordion {
21
- interface RootProps {
22
- children?: ReactNode;
23
- className?: string;
24
- }
25
- interface ItemProps {
26
- children?: ReactNode;
90
+ // Slot components
91
+ declare module '@rn-primitives/slot' {
92
+ import type {
93
+ PressableProps as RNPressableProps,
94
+ ViewProps as RNViewProps,
95
+ TextProps as RNTextProps,
96
+ TextInputProps as RNTextInputProps,
97
+ } from 'react-native';
98
+
99
+ export interface SlotProps extends RNViewProps {
100
+ children?: React.ReactNode;
101
+ className?: string;
102
+ }
103
+
104
+ export const Slot: React.ForwardRefExoticComponent<
105
+ SlotProps & React.RefAttributes<any>
106
+ >;
107
+
108
+ export const Pressable: React.ForwardRefExoticComponent<
109
+ RNPressableProps & {
27
110
  className?: string;
28
- }
29
- interface HeaderProps {
30
- children?: ReactNode;
111
+ children?: React.ReactNode;
112
+ cssInterop?: boolean;
113
+ } & React.RefAttributes<any>
114
+ >;
115
+
116
+ export const Text: React.ForwardRefExoticComponent<
117
+ RNTextProps & {
31
118
  className?: string;
32
- }
33
- interface TriggerProps {
34
- children?: ReactNode;
119
+ children?: React.ReactNode;
120
+ cssInterop?: boolean;
121
+ } & React.RefAttributes<any>
122
+ >;
123
+
124
+ export const View: React.ForwardRefExoticComponent<
125
+ RNViewProps & {
35
126
  className?: string;
36
- }
37
- interface ContentProps {
38
- children?: ReactNode;
127
+ children?: React.ReactNode;
128
+ cssInterop?: boolean;
129
+ } & React.RefAttributes<any>
130
+ >;
131
+
132
+ export const TextInput: React.ForwardRefExoticComponent<
133
+ RNTextInputProps & {
39
134
  className?: string;
40
- }
135
+ children?: React.ReactNode;
136
+ cssInterop?: boolean;
137
+ } & React.RefAttributes<any>
138
+ >;
139
+ }
140
+
141
+ // Accordion
142
+ declare module '@rn-primitives/accordion' {
143
+ import type { ComponentPropsWithoutRef } from 'react';
144
+ import type { View, Pressable } from 'react-native';
145
+
146
+ export type RootRef = React.ElementRef<typeof View>;
147
+ export type ItemRef = React.ElementRef<typeof View>;
148
+ export type HeaderRef = React.ElementRef<typeof View>;
149
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
150
+ export type ContentRef = React.ElementRef<typeof View>;
151
+
152
+ interface BaseProps {
153
+ asChild?: boolean;
154
+ className?: string;
155
+ children?: React.ReactNode;
156
+ }
157
+
158
+ export interface RootProps
159
+ extends ComponentPropsWithoutRef<typeof View>,
160
+ BaseProps {
161
+ type: 'single' | 'multiple';
162
+ collapsible?: boolean;
163
+ defaultValue?: string | string[];
164
+ value?: string | string[];
165
+ onValueChange?: (value: string | string[]) => void;
166
+ disabled?: boolean;
167
+ }
168
+
169
+ export interface ItemProps
170
+ extends ComponentPropsWithoutRef<typeof View>,
171
+ BaseProps {
172
+ value: string;
173
+ disabled?: boolean;
174
+ }
175
+
176
+ export interface HeaderProps
177
+ extends ComponentPropsWithoutRef<typeof View>,
178
+ BaseProps {}
179
+
180
+ export interface TriggerProps
181
+ extends ComponentPropsWithoutRef<typeof Pressable>,
182
+ BaseProps {
183
+ disabled?: boolean;
184
+ }
185
+
186
+ export interface ContentProps
187
+ extends ComponentPropsWithoutRef<typeof View>,
188
+ BaseProps {
189
+ forceMount?: boolean;
190
+ }
191
+
192
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
193
+ export const Item: React.ForwardRefExoticComponent<ItemProps>;
194
+ export const Header: React.ForwardRefExoticComponent<HeaderProps>;
195
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
196
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
197
+
198
+ export function useItemContext(): { isExpanded: boolean; disabled: boolean };
199
+ }
200
+
201
+ // Alert Dialog
202
+ declare module '@rn-primitives/alert-dialog' {
203
+ import type { ComponentPropsWithoutRef } from 'react';
204
+ import type { View, Pressable, Text } from 'react-native';
205
+
206
+ export type RootRef = React.ElementRef<typeof View>;
207
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
208
+ export type PortalRef = React.ElementRef<typeof View>;
209
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
210
+ export type ContentRef = React.ElementRef<typeof View>;
211
+ export type TitleRef = React.ElementRef<typeof Text>;
212
+ export type DescriptionRef = React.ElementRef<typeof Text>;
213
+ export type ActionRef = React.ElementRef<typeof Pressable>;
214
+ export type CancelRef = React.ElementRef<typeof Pressable>;
215
+
216
+ interface BaseProps {
217
+ asChild?: boolean;
218
+ className?: string;
219
+ children?: React.ReactNode;
220
+ }
221
+
222
+ export interface RootProps extends BaseProps {
223
+ open?: boolean;
224
+ onOpenChange?: (open: boolean) => void;
225
+ defaultOpen?: boolean;
226
+ }
227
+
228
+ export interface TriggerProps
229
+ extends ComponentPropsWithoutRef<typeof Pressable>,
230
+ BaseProps {}
231
+ export interface PortalProps extends BaseProps {
232
+ hostName?: string;
233
+ container?: React.RefObject<View>;
234
+ }
235
+ export interface OverlayProps
236
+ extends ComponentPropsWithoutRef<typeof Pressable>,
237
+ BaseProps {
238
+ forceMount?: boolean;
239
+ closeOnPress?: boolean;
240
+ }
241
+ export interface ContentProps
242
+ extends ComponentPropsWithoutRef<typeof View>,
243
+ BaseProps {
244
+ forceMount?: boolean;
245
+ alignOffset?: number;
246
+ insets?: { top?: number; bottom?: number; left?: number; right?: number };
247
+ avoidCollisions?: boolean;
248
+ align?: 'start' | 'center' | 'end';
249
+ side?: 'top' | 'bottom' | 'left' | 'right';
250
+ sideOffset?: number;
41
251
  }
252
+ export interface TitleProps
253
+ extends ComponentPropsWithoutRef<typeof Text>,
254
+ BaseProps {}
255
+ export interface DescriptionProps
256
+ extends ComponentPropsWithoutRef<typeof Text>,
257
+ BaseProps {}
258
+ export interface ActionProps
259
+ extends ComponentPropsWithoutRef<typeof Pressable>,
260
+ BaseProps {}
261
+ export interface CancelProps
262
+ extends ComponentPropsWithoutRef<typeof Pressable>,
263
+ BaseProps {}
264
+
265
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
266
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
267
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
268
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
269
+ export const Content: React.ForwardRefExoticComponent<ContentRef>;
270
+ export const Title: React.ForwardRefExoticComponent<TitleProps>;
271
+ export const Description: React.ForwardRefExoticComponent<DescriptionProps>;
272
+ export const Action: React.ForwardRefExoticComponent<ActionProps>;
273
+ export const Cancel: React.ForwardRefExoticComponent<CancelProps>;
42
274
  }
43
275
 
276
+ // Dialog
44
277
  declare module '@rn-primitives/dialog' {
278
+ import type { ComponentPropsWithoutRef } from 'react';
279
+ import type { View, Pressable, Text } from 'react-native';
280
+
281
+ export type RootRef = React.ElementRef<typeof View>;
282
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
283
+ export type PortalRef = React.ElementRef<typeof View>;
284
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
285
+ export type ContentRef = React.ElementRef<typeof View>;
286
+ export type TitleRef = React.ElementRef<typeof Text>;
287
+ export type DescriptionRef = React.ElementRef<typeof Text>;
288
+ export type CloseRef = React.ElementRef<typeof Pressable>;
289
+
290
+ interface BaseProps {
291
+ asChild?: boolean;
292
+ className?: string;
293
+ children?: React.ReactNode;
294
+ }
295
+
296
+ export interface RootProps extends BaseProps {
297
+ open?: boolean;
298
+ onOpenChange?: (open: boolean) => void;
299
+ defaultOpen?: boolean;
300
+ modal?: boolean;
301
+ }
302
+
303
+ export interface TriggerProps
304
+ extends ComponentPropsWithoutRef<typeof Pressable>,
305
+ BaseProps {}
306
+ export interface PortalProps extends BaseProps {
307
+ hostName?: string;
308
+ container?: React.RefObject<View>;
309
+ }
310
+ export interface OverlayProps
311
+ extends ComponentPropsWithoutRef<typeof Pressable>,
312
+ BaseProps {
313
+ forceMount?: boolean;
314
+ closeOnPress?: boolean;
315
+ }
316
+ export interface ContentProps
317
+ extends ComponentPropsWithoutRef<typeof View>,
318
+ BaseProps {
319
+ forceMount?: boolean;
320
+ alignOffset?: number;
321
+ insets?: { top?: number; bottom?: number; left?: number; right?: number };
322
+ avoidCollisions?: boolean;
323
+ align?: 'start' | 'center' | 'end';
324
+ side?: 'top' | 'bottom' | 'left' | 'right';
325
+ sideOffset?: number;
326
+ }
327
+ export interface TitleProps
328
+ extends ComponentPropsWithoutRef<typeof Text>,
329
+ BaseProps {}
330
+ export interface DescriptionProps
331
+ extends ComponentPropsWithoutRef<typeof Text>,
332
+ BaseProps {}
333
+ export interface CloseProps
334
+ extends ComponentPropsWithoutRef<typeof Pressable>,
335
+ BaseProps {}
336
+
337
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
338
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
339
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
340
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
341
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
342
+ export const Title: React.ForwardRefExoticComponent<TitleProps>;
343
+ export const Description: React.ForwardRefExoticComponent<DescriptionProps>;
344
+ export const Close: React.ForwardRefExoticComponent<CloseProps>;
345
+ }
346
+
347
+ // Checkbox
348
+ declare module '@rn-primitives/checkbox' {
349
+ import type { ComponentPropsWithoutRef } from 'react';
350
+ import type { Pressable, View } from 'react-native';
351
+
352
+ export type RootRef = React.ElementRef<typeof Pressable>;
353
+ export type IndicatorRef = React.ElementRef<typeof View>;
354
+
355
+ interface BaseProps {
356
+ asChild?: boolean;
357
+ className?: string;
358
+ children?: React.ReactNode;
359
+ }
360
+
361
+ export interface RootProps
362
+ extends ComponentPropsWithoutRef<typeof Pressable>,
363
+ BaseProps {
364
+ checked?: boolean | 'indeterminate';
365
+ onCheckedChange?: (checked: boolean | 'indeterminate') => void;
366
+ defaultChecked?: boolean;
367
+ disabled?: boolean;
368
+ required?: boolean;
369
+ name?: string;
370
+ value?: string;
371
+ }
372
+
373
+ export interface IndicatorProps
374
+ extends ComponentPropsWithoutRef<typeof View>,
375
+ BaseProps {
376
+ forceMount?: boolean;
377
+ }
378
+
379
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
380
+ export const Indicator: React.ForwardRefExoticComponent<IndicatorProps>;
381
+
382
+ export function useRootContext(): {
383
+ checked: boolean | 'indeterminate';
384
+ disabled: boolean;
385
+ };
386
+ }
387
+
388
+ // Context Menu
389
+ declare module '@rn-primitives/context-menu' {
390
+ import type { ComponentPropsWithoutRef } from 'react';
391
+ import type { View, Pressable, Text } from 'react-native';
392
+
393
+ export type RootRef = React.ElementRef<typeof View>;
394
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
395
+ export type PortalRef = React.ElementRef<typeof View>;
396
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
397
+ export type ContentRef = React.ElementRef<typeof View>;
398
+ export type ItemRef = React.ElementRef<typeof Pressable>;
399
+ export type GroupRef = React.ElementRef<typeof View>;
400
+ export type LabelRef = React.ElementRef<typeof Text>;
401
+ export type CheckboxItemRef = React.ElementRef<typeof Pressable>;
402
+ export type RadioItemRef = React.ElementRef<typeof Pressable>;
403
+ export type RadioGroupRef = React.ElementRef<typeof View>;
404
+ export type ItemIndicatorRef = React.ElementRef<typeof View>;
405
+ export type SeparatorRef = React.ElementRef<typeof View>;
406
+ export type SubRef = React.ElementRef<typeof View>;
407
+ export type SubTriggerRef = React.ElementRef<typeof Pressable>;
408
+ export type SubContentRef = React.ElementRef<typeof View>;
409
+
410
+ interface BaseProps {
411
+ asChild?: boolean;
412
+ className?: string;
413
+ children?: React.ReactNode;
414
+ }
415
+
416
+ export interface RootProps extends BaseProps {
417
+ onOpenChange?: (open: boolean) => void;
418
+ }
419
+ export interface TriggerProps
420
+ extends ComponentPropsWithoutRef<typeof Pressable>,
421
+ BaseProps {}
422
+ export interface PortalProps extends BaseProps {}
423
+ export interface OverlayProps
424
+ extends ComponentPropsWithoutRef<typeof Pressable>,
425
+ BaseProps {}
426
+ export interface ContentProps
427
+ extends ComponentPropsWithoutRef<typeof View>,
428
+ BaseProps {
429
+ align?: 'start' | 'center' | 'end';
430
+ side?: 'top' | 'bottom' | 'left' | 'right';
431
+ sideOffset?: number;
432
+ alignOffset?: number;
433
+ avoidCollisions?: boolean;
434
+ }
435
+ export interface ItemProps
436
+ extends ComponentPropsWithoutRef<typeof Pressable>,
437
+ BaseProps {
438
+ disabled?: boolean;
439
+ textValue?: string;
440
+ onSelect?: () => void;
441
+ }
442
+ export interface GroupProps
443
+ extends ComponentPropsWithoutRef<typeof View>,
444
+ BaseProps {}
445
+ export interface LabelProps
446
+ extends ComponentPropsWithoutRef<typeof Text>,
447
+ BaseProps {}
448
+ export interface CheckboxItemProps
449
+ extends ComponentPropsWithoutRef<typeof Pressable>,
450
+ BaseProps {
451
+ checked?: boolean;
452
+ onCheckedChange?: (checked: boolean) => void;
453
+ disabled?: boolean;
454
+ textValue?: string;
455
+ }
456
+ export interface RadioItemProps
457
+ extends ComponentPropsWithoutRef<typeof Pressable>,
458
+ BaseProps {
459
+ value: string;
460
+ disabled?: boolean;
461
+ textValue?: string;
462
+ }
463
+ export interface RadioGroupProps
464
+ extends ComponentPropsWithoutRef<typeof View>,
465
+ BaseProps {
466
+ value?: string;
467
+ onValueChange?: (value: string) => void;
468
+ }
469
+ export interface ItemIndicatorProps
470
+ extends ComponentPropsWithoutRef<typeof View>,
471
+ BaseProps {}
472
+ export interface SeparatorProps
473
+ extends ComponentPropsWithoutRef<typeof View>,
474
+ BaseProps {}
475
+ export interface SubProps extends BaseProps {}
476
+ export interface SubTriggerProps
477
+ extends ComponentPropsWithoutRef<typeof Pressable>,
478
+ BaseProps {}
479
+ export interface SubContentProps
480
+ extends ComponentPropsWithoutRef<typeof View>,
481
+ BaseProps {
482
+ align?: 'start' | 'center' | 'end';
483
+ side?: 'top' | 'bottom' | 'left' | 'right';
484
+ sideOffset?: number;
485
+ alignOffset?: number;
486
+ avoidCollisions?: boolean;
487
+ }
488
+
489
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
490
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
491
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
492
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
493
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
494
+ export const Item: React.ForwardRefExoticComponent<ItemProps>;
495
+ export const Group: React.ForwardRefExoticComponent<GroupProps>;
496
+ export const Label: React.ForwardRefExoticComponent<LabelProps>;
497
+ export const CheckboxItem: React.ForwardRefExoticComponent<CheckboxItemProps>;
498
+ export const RadioItem: React.ForwardRefExoticComponent<RadioItemProps>;
499
+ export const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps>;
500
+ export const ItemIndicator: React.ForwardRefExoticComponent<ItemIndicatorProps>;
501
+ export const Separator: React.ForwardRefExoticComponent<SeparatorProps>;
502
+ export const Sub: React.ForwardRefExoticComponent<SubProps>;
503
+ export const SubTrigger: React.ForwardRefExoticComponent<SubTriggerProps>;
504
+ export const SubContent: React.ForwardRefExoticComponent<SubContentProps>;
505
+ }
506
+
507
+ // Dropdown Menu
508
+ declare module '@rn-primitives/dropdown-menu' {
509
+ import type { ComponentPropsWithoutRef } from 'react';
510
+ import type { View, Pressable, Text } from 'react-native';
511
+
512
+ export type RootRef = React.ElementRef<typeof View>;
513
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
514
+ export type PortalRef = React.ElementRef<typeof View>;
515
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
516
+ export type ContentRef = React.ElementRef<typeof View>;
517
+ export type ItemRef = React.ElementRef<typeof Pressable>;
518
+ export type GroupRef = React.ElementRef<typeof View>;
519
+ export type LabelRef = React.ElementRef<typeof Text>;
520
+ export type CheckboxItemRef = React.ElementRef<typeof Pressable>;
521
+ export type RadioItemRef = React.ElementRef<typeof Pressable>;
522
+ export type RadioGroupRef = React.ElementRef<typeof View>;
523
+ export type ItemIndicatorRef = React.ElementRef<typeof View>;
524
+ export type SeparatorRef = React.ElementRef<typeof View>;
525
+ export type SubRef = React.ElementRef<typeof View>;
526
+ export type SubTriggerRef = React.ElementRef<typeof Pressable>;
527
+ export type SubContentRef = React.ElementRef<typeof View>;
528
+
529
+ interface BaseProps {
530
+ asChild?: boolean;
531
+ className?: string;
532
+ children?: React.ReactNode;
533
+ }
534
+
535
+ export interface RootProps extends BaseProps {
536
+ open?: boolean;
537
+ onOpenChange?: (open: boolean) => void;
538
+ defaultOpen?: boolean;
539
+ }
540
+ export interface TriggerProps
541
+ extends ComponentPropsWithoutRef<typeof Pressable>,
542
+ BaseProps {}
543
+ export interface PortalProps extends BaseProps {}
544
+ export interface OverlayProps
545
+ extends ComponentPropsWithoutRef<typeof Pressable>,
546
+ BaseProps {}
547
+ export interface ContentProps
548
+ extends ComponentPropsWithoutRef<typeof View>,
549
+ BaseProps {
550
+ align?: 'start' | 'center' | 'end';
551
+ side?: 'top' | 'bottom' | 'left' | 'right';
552
+ sideOffset?: number;
553
+ alignOffset?: number;
554
+ avoidCollisions?: boolean;
555
+ }
556
+ export interface ItemProps
557
+ extends ComponentPropsWithoutRef<typeof Pressable>,
558
+ BaseProps {
559
+ disabled?: boolean;
560
+ textValue?: string;
561
+ onSelect?: () => void;
562
+ }
563
+ export interface GroupProps
564
+ extends ComponentPropsWithoutRef<typeof View>,
565
+ BaseProps {}
566
+ export interface LabelProps
567
+ extends ComponentPropsWithoutRef<typeof Text>,
568
+ BaseProps {}
569
+ export interface CheckboxItemProps
570
+ extends ComponentPropsWithoutRef<typeof Pressable>,
571
+ BaseProps {
572
+ checked?: boolean;
573
+ onCheckedChange?: (checked: boolean) => void;
574
+ disabled?: boolean;
575
+ textValue?: string;
576
+ }
577
+ export interface RadioItemProps
578
+ extends ComponentPropsWithoutRef<typeof Pressable>,
579
+ BaseProps {
580
+ value: string;
581
+ disabled?: boolean;
582
+ textValue?: string;
583
+ }
584
+ export interface RadioGroupProps
585
+ extends ComponentPropsWithoutRef<typeof View>,
586
+ BaseProps {
587
+ value?: string;
588
+ onValueChange?: (value: string) => void;
589
+ }
590
+ export interface ItemIndicatorProps
591
+ extends ComponentPropsWithoutRef<typeof View>,
592
+ BaseProps {}
593
+ export interface SeparatorProps
594
+ extends ComponentPropsWithoutRef<typeof View>,
595
+ BaseProps {}
596
+ export interface SubProps extends BaseProps {
597
+ open?: boolean;
598
+ onOpenChange?: (open: boolean) => void;
599
+ }
600
+ export interface SubTriggerProps
601
+ extends ComponentPropsWithoutRef<typeof Pressable>,
602
+ BaseProps {}
603
+ export interface SubContentProps
604
+ extends ComponentPropsWithoutRef<typeof View>,
605
+ BaseProps {}
606
+
607
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
608
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
609
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
610
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
611
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
612
+ export const Item: React.ForwardRefExoticComponent<ItemProps>;
613
+ export const Group: React.ForwardRefExoticComponent<GroupProps>;
614
+ export const Label: React.ForwardRefExoticComponent<LabelProps>;
615
+ export const CheckboxItem: React.ForwardRefExoticComponent<CheckboxItemProps>;
616
+ export const RadioItem: React.ForwardRefExoticComponent<RadioItemProps>;
617
+ export const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps>;
618
+ export const ItemIndicator: React.ForwardRefExoticComponent<ItemIndicatorProps>;
619
+ export const Separator: React.ForwardRefExoticComponent<SeparatorProps>;
620
+ export const Sub: React.ForwardRefExoticComponent<SubProps>;
621
+ export const SubTrigger: React.ForwardRefExoticComponent<SubTriggerProps>;
622
+ export const SubContent: React.ForwardRefExoticComponent<SubContentProps>;
623
+ }
624
+
625
+ // Hover Card
626
+ declare module '@rn-primitives/hover-card' {
627
+ import type { ComponentPropsWithoutRef } from 'react';
628
+ import type { View, Pressable } from 'react-native';
629
+
630
+ export type RootRef = React.ElementRef<typeof View>;
631
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
632
+ export type PortalRef = React.ElementRef<typeof View>;
633
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
634
+ export type ContentRef = React.ElementRef<typeof View>;
635
+
636
+ interface BaseProps {
637
+ asChild?: boolean;
638
+ className?: string;
639
+ children?: React.ReactNode;
640
+ }
641
+
642
+ export interface RootProps extends BaseProps {
643
+ open?: boolean;
644
+ onOpenChange?: (open: boolean) => void;
645
+ defaultOpen?: boolean;
646
+ openDelay?: number;
647
+ closeDelay?: number;
648
+ }
649
+ export interface TriggerProps
650
+ extends ComponentPropsWithoutRef<typeof Pressable>,
651
+ BaseProps {}
652
+ export interface PortalProps extends BaseProps {}
653
+ export interface OverlayProps
654
+ extends ComponentPropsWithoutRef<typeof Pressable>,
655
+ BaseProps {}
656
+ export interface ContentProps
657
+ extends ComponentPropsWithoutRef<typeof View>,
658
+ BaseProps {
659
+ align?: 'start' | 'center' | 'end';
660
+ side?: 'top' | 'bottom' | 'left' | 'right';
661
+ sideOffset?: number;
662
+ alignOffset?: number;
663
+ avoidCollisions?: boolean;
664
+ }
665
+
666
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
667
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
668
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
669
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
670
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
671
+ }
672
+
673
+ // Label
674
+ declare module '@rn-primitives/label' {
675
+ import type { ComponentPropsWithoutRef } from 'react';
676
+ import type { Text } from 'react-native';
677
+
678
+ export type RootRef = React.ElementRef<typeof Text>;
679
+
680
+ export interface RootProps extends ComponentPropsWithoutRef<typeof Text> {
681
+ asChild?: boolean;
682
+ className?: string;
683
+ children?: React.ReactNode;
684
+ nativeID?: string;
685
+ }
686
+
687
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
688
+ export const useRootContext: () => { nativeID: string | undefined };
689
+ }
690
+
691
+ // Menubar
692
+ declare module '@rn-primitives/menubar' {
693
+ import type { ComponentPropsWithoutRef } from 'react';
694
+ import type { View, Pressable, Text } from 'react-native';
695
+
696
+ export type RootRef = React.ElementRef<typeof View>;
697
+ export type MenuRef = React.ElementRef<typeof View>;
698
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
699
+ export type PortalRef = React.ElementRef<typeof View>;
700
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
701
+ export type ContentRef = React.ElementRef<typeof View>;
702
+ export type ItemRef = React.ElementRef<typeof Pressable>;
703
+ export type GroupRef = React.ElementRef<typeof View>;
704
+ export type LabelRef = React.ElementRef<typeof Text>;
705
+ export type CheckboxItemRef = React.ElementRef<typeof Pressable>;
706
+ export type RadioItemRef = React.ElementRef<typeof Pressable>;
707
+ export type RadioGroupRef = React.ElementRef<typeof View>;
708
+ export type ItemIndicatorRef = React.ElementRef<typeof View>;
709
+ export type SeparatorRef = React.ElementRef<typeof View>;
710
+ export type SubRef = React.ElementRef<typeof View>;
711
+ export type SubTriggerRef = React.ElementRef<typeof Pressable>;
712
+ export type SubContentRef = React.ElementRef<typeof View>;
713
+
714
+ interface BaseProps {
715
+ asChild?: boolean;
716
+ className?: string;
717
+ children?: React.ReactNode;
718
+ }
719
+
720
+ export interface RootProps
721
+ extends ComponentPropsWithoutRef<typeof View>,
722
+ BaseProps {
723
+ value?: string;
724
+ onValueChange?: (value: string | undefined) => void;
725
+ }
726
+ export interface MenuProps extends BaseProps {
727
+ value: string;
728
+ }
729
+ export interface TriggerProps
730
+ extends ComponentPropsWithoutRef<typeof Pressable>,
731
+ BaseProps {}
732
+ export interface PortalProps extends BaseProps {}
733
+ export interface OverlayProps
734
+ extends ComponentPropsWithoutRef<typeof Pressable>,
735
+ BaseProps {}
736
+ export interface ContentProps
737
+ extends ComponentPropsWithoutRef<typeof View>,
738
+ BaseProps {
739
+ align?: 'start' | 'center' | 'end';
740
+ side?: 'top' | 'bottom' | 'left' | 'right';
741
+ sideOffset?: number;
742
+ alignOffset?: number;
743
+ avoidCollisions?: boolean;
744
+ overlayStyle?: any;
745
+ }
746
+ export interface ItemProps
747
+ extends ComponentPropsWithoutRef<typeof Pressable>,
748
+ BaseProps {
749
+ disabled?: boolean;
750
+ textValue?: string;
751
+ onSelect?: () => void;
752
+ }
753
+ export interface GroupProps
754
+ extends ComponentPropsWithoutRef<typeof View>,
755
+ BaseProps {}
756
+ export interface LabelProps
757
+ extends ComponentPropsWithoutRef<typeof Text>,
758
+ BaseProps {}
759
+ export interface CheckboxItemProps
760
+ extends ComponentPropsWithoutRef<typeof Pressable>,
761
+ BaseProps {
762
+ checked?: boolean;
763
+ onCheckedChange?: (checked: boolean) => void;
764
+ disabled?: boolean;
765
+ textValue?: string;
766
+ }
767
+ export interface RadioItemProps
768
+ extends ComponentPropsWithoutRef<typeof Pressable>,
769
+ BaseProps {
770
+ value: string;
771
+ disabled?: boolean;
772
+ textValue?: string;
773
+ }
774
+ export interface RadioGroupProps
775
+ extends ComponentPropsWithoutRef<typeof View>,
776
+ BaseProps {
777
+ value?: string;
778
+ onValueChange?: (value: string) => void;
779
+ }
780
+ export interface ItemIndicatorProps
781
+ extends ComponentPropsWithoutRef<typeof View>,
782
+ BaseProps {}
783
+ export interface SeparatorProps
784
+ extends ComponentPropsWithoutRef<typeof View>,
785
+ BaseProps {}
786
+ export interface SubProps extends BaseProps {}
787
+ export interface SubTriggerProps
788
+ extends ComponentPropsWithoutRef<typeof Pressable>,
789
+ BaseProps {}
790
+ export interface SubContentProps
791
+ extends ComponentPropsWithoutRef<typeof View>,
792
+ BaseProps {}
793
+
794
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
795
+ export const Menu: React.ForwardRefExoticComponent<MenuProps>;
796
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
797
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
798
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
799
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
800
+ export const Item: React.ForwardRefExoticComponent<ItemProps>;
801
+ export const Group: React.ForwardRefExoticComponent<GroupProps>;
802
+ export const Label: React.ForwardRefExoticComponent<LabelProps>;
803
+ export const CheckboxItem: React.ForwardRefExoticComponent<CheckboxItemProps>;
804
+ export const RadioItem: React.ForwardRefExoticComponent<RadioItemProps>;
805
+ export const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps>;
806
+ export const ItemIndicator: React.ForwardRefExoticComponent<ItemIndicatorProps>;
807
+ export const Separator: React.ForwardRefExoticComponent<SeparatorProps>;
808
+ export const Sub: React.ForwardRefExoticComponent<SubProps>;
809
+ export const SubTrigger: React.ForwardRefExoticComponent<SubTriggerProps>;
810
+ export const SubContent: React.ForwardRefExoticComponent<SubContentProps>;
811
+ }
812
+
813
+ // Popover
814
+ declare module '@rn-primitives/popover' {
815
+ import type { ComponentPropsWithoutRef } from 'react';
816
+ import type { View, Pressable } from 'react-native';
817
+
818
+ export type RootRef = React.ElementRef<typeof View>;
819
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
820
+ export type PortalRef = React.ElementRef<typeof View>;
821
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
822
+ export type ContentRef = React.ElementRef<typeof View>;
823
+ export type CloseRef = React.ElementRef<typeof Pressable>;
824
+
825
+ interface BaseProps {
826
+ asChild?: boolean;
827
+ className?: string;
828
+ children?: React.ReactNode;
829
+ }
830
+
831
+ export interface RootProps extends BaseProps {
832
+ open?: boolean;
833
+ onOpenChange?: (open: boolean) => void;
834
+ defaultOpen?: boolean;
835
+ }
836
+ export interface TriggerProps
837
+ extends ComponentPropsWithoutRef<typeof Pressable>,
838
+ BaseProps {}
839
+ export interface PortalProps extends BaseProps {}
840
+ export interface OverlayProps
841
+ extends ComponentPropsWithoutRef<typeof Pressable>,
842
+ BaseProps {
843
+ closeOnPress?: boolean;
844
+ }
845
+ export interface ContentProps
846
+ extends ComponentPropsWithoutRef<typeof View>,
847
+ BaseProps {
848
+ align?: 'start' | 'center' | 'end';
849
+ side?: 'top' | 'bottom' | 'left' | 'right';
850
+ sideOffset?: number;
851
+ alignOffset?: number;
852
+ avoidCollisions?: boolean;
853
+ }
854
+ export interface CloseProps
855
+ extends ComponentPropsWithoutRef<typeof Pressable>,
856
+ BaseProps {}
857
+
858
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
859
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
860
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
861
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
862
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
863
+ export const Close: React.ForwardRefExoticComponent<CloseProps>;
864
+ }
865
+
866
+ // Progress
867
+ declare module '@rn-primitives/progress' {
868
+ import type { ComponentPropsWithoutRef } from 'react';
869
+ import type { View } from 'react-native';
870
+
871
+ export type RootRef = React.ElementRef<typeof View>;
872
+ export type IndicatorRef = React.ElementRef<typeof View>;
873
+
874
+ interface BaseProps {
875
+ asChild?: boolean;
876
+ className?: string;
877
+ children?: React.ReactNode;
878
+ }
879
+
880
+ export interface RootProps
881
+ extends ComponentPropsWithoutRef<typeof View>,
882
+ BaseProps {
883
+ value?: number | null;
884
+ max?: number;
885
+ }
886
+
887
+ export interface IndicatorProps
888
+ extends ComponentPropsWithoutRef<typeof View>,
889
+ BaseProps {}
890
+
891
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
892
+ export const Indicator: React.ForwardRefExoticComponent<IndicatorProps>;
893
+
894
+ export function useRootContext(): { value: number | null; max: number };
895
+ }
896
+
897
+ // Radio Group
898
+ declare module '@rn-primitives/radio-group' {
899
+ import type { ComponentPropsWithoutRef } from 'react';
900
+ import type { View, Pressable } from 'react-native';
901
+
902
+ export type RootRef = React.ElementRef<typeof View>;
903
+ export type ItemRef = React.ElementRef<typeof Pressable>;
904
+ export type IndicatorRef = React.ElementRef<typeof View>;
905
+
906
+ interface BaseProps {
907
+ asChild?: boolean;
908
+ className?: string;
909
+ children?: React.ReactNode;
910
+ }
911
+
912
+ export interface RootProps
913
+ extends ComponentPropsWithoutRef<typeof View>,
914
+ BaseProps {
915
+ value?: string;
916
+ onValueChange?: (value: string) => void;
917
+ disabled?: boolean;
918
+ required?: boolean;
919
+ name?: string;
920
+ }
921
+
922
+ export interface ItemProps
923
+ extends ComponentPropsWithoutRef<typeof Pressable>,
924
+ BaseProps {
925
+ value: string;
926
+ disabled?: boolean;
927
+ }
928
+
929
+ export interface IndicatorProps
930
+ extends ComponentPropsWithoutRef<typeof View>,
931
+ BaseProps {}
932
+
933
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
934
+ export const Item: React.ForwardRefExoticComponent<ItemProps>;
935
+ export const Indicator: React.ForwardRefExoticComponent<IndicatorProps>;
936
+
937
+ export function useRootContext(): {
938
+ value: string | undefined;
939
+ disabled: boolean;
940
+ };
941
+ export function useItemContext(): { checked: boolean; disabled: boolean };
942
+ }
943
+
944
+ // Select
945
+ declare module '@rn-primitives/select' {
946
+ import type { ComponentPropsWithoutRef } from 'react';
947
+ import type { View, Pressable, Text, ScrollView } from 'react-native';
948
+
949
+ export type RootRef = React.ElementRef<typeof View>;
950
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
951
+ export type PortalRef = React.ElementRef<typeof View>;
952
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
953
+ export type ContentRef = React.ElementRef<typeof ScrollView>;
954
+ export type ItemRef = React.ElementRef<typeof Pressable>;
955
+ export type ItemTextRef = React.ElementRef<typeof Text>;
956
+ export type ItemIndicatorRef = React.ElementRef<typeof View>;
957
+ export type GroupRef = React.ElementRef<typeof View>;
958
+ export type LabelRef = React.ElementRef<typeof Text>;
959
+ export type SeparatorRef = React.ElementRef<typeof View>;
960
+ export type ValueRef = React.ElementRef<typeof Text>;
961
+
962
+ interface BaseProps {
963
+ asChild?: boolean;
964
+ className?: string;
965
+ children?: React.ReactNode;
966
+ }
967
+
968
+ export interface RootProps extends BaseProps {
969
+ value?: string;
970
+ onValueChange?: (value: string) => void;
971
+ defaultValue?: string;
972
+ open?: boolean;
973
+ onOpenChange?: (open: boolean) => void;
974
+ defaultOpen?: boolean;
975
+ disabled?: boolean;
976
+ required?: boolean;
977
+ name?: string;
978
+ }
979
+ export interface TriggerProps
980
+ extends ComponentPropsWithoutRef<typeof Pressable>,
981
+ BaseProps {}
982
+ export interface PortalProps extends BaseProps {}
983
+ export interface OverlayProps
984
+ extends ComponentPropsWithoutRef<typeof Pressable>,
985
+ BaseProps {
986
+ closeOnPress?: boolean;
987
+ }
988
+ export interface ContentProps
989
+ extends ComponentPropsWithoutRef<typeof ScrollView>,
990
+ BaseProps {
991
+ align?: 'start' | 'center' | 'end';
992
+ side?: 'top' | 'bottom' | 'left' | 'right';
993
+ sideOffset?: number;
994
+ alignOffset?: number;
995
+ avoidCollisions?: boolean;
996
+ position?: 'popper' | 'item-aligned';
997
+ }
998
+ export interface ItemProps
999
+ extends ComponentPropsWithoutRef<typeof Pressable>,
1000
+ BaseProps {
1001
+ value: string;
1002
+ disabled?: boolean;
1003
+ textValue?: string;
1004
+ }
1005
+ export interface ItemTextProps
1006
+ extends ComponentPropsWithoutRef<typeof Text>,
1007
+ BaseProps {}
1008
+ export interface ItemIndicatorProps
1009
+ extends ComponentPropsWithoutRef<typeof View>,
1010
+ BaseProps {}
1011
+ export interface GroupProps
1012
+ extends ComponentPropsWithoutRef<typeof View>,
1013
+ BaseProps {}
1014
+ export interface LabelProps
1015
+ extends ComponentPropsWithoutRef<typeof Text>,
1016
+ BaseProps {}
1017
+ export interface SeparatorProps
1018
+ extends ComponentPropsWithoutRef<typeof View>,
1019
+ BaseProps {}
1020
+ export interface ValueProps
1021
+ extends ComponentPropsWithoutRef<typeof Text>,
1022
+ BaseProps {
1023
+ placeholder?: string;
1024
+ }
1025
+
1026
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1027
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
1028
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
1029
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
1030
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
1031
+ export const Item: React.ForwardRefExoticComponent<ItemProps>;
1032
+ export const ItemText: React.ForwardRefExoticComponent<ItemTextProps>;
1033
+ export const ItemIndicator: React.ForwardRefExoticComponent<ItemIndicatorProps>;
1034
+ export const Group: React.ForwardRefExoticComponent<GroupProps>;
1035
+ export const Label: React.ForwardRefExoticComponent<LabelProps>;
1036
+ export const Separator: React.ForwardRefExoticComponent<SeparatorProps>;
1037
+ export const Value: React.ForwardRefExoticComponent<ValueProps>;
1038
+ }
1039
+
1040
+ // Separator
1041
+ declare module '@rn-primitives/separator' {
1042
+ import type { ComponentPropsWithoutRef } from 'react';
1043
+ import type { View } from 'react-native';
1044
+
1045
+ export type RootRef = React.ElementRef<typeof View>;
1046
+
1047
+ export interface RootProps extends ComponentPropsWithoutRef<typeof View> {
1048
+ asChild?: boolean;
1049
+ className?: string;
1050
+ children?: React.ReactNode;
1051
+ orientation?: 'horizontal' | 'vertical';
1052
+ decorative?: boolean;
1053
+ }
1054
+
1055
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1056
+ }
1057
+
1058
+ // Slider
1059
+ declare module '@rn-primitives/slider' {
1060
+ import type { ComponentPropsWithoutRef } from 'react';
1061
+ import type { View } from 'react-native';
1062
+
1063
+ export type RootRef = React.ElementRef<typeof View>;
1064
+ export type TrackRef = React.ElementRef<typeof View>;
1065
+ export type RangeRef = React.ElementRef<typeof View>;
1066
+ export type ThumbRef = React.ElementRef<typeof View>;
1067
+
1068
+ interface BaseProps {
1069
+ asChild?: boolean;
1070
+ className?: string;
1071
+ children?: React.ReactNode;
1072
+ }
1073
+
1074
+ export interface RootProps
1075
+ extends ComponentPropsWithoutRef<typeof View>,
1076
+ BaseProps {
1077
+ value?: number[];
1078
+ onValueChange?: (value: number[]) => void;
1079
+ defaultValue?: number[];
1080
+ min?: number;
1081
+ max?: number;
1082
+ step?: number;
1083
+ disabled?: boolean;
1084
+ orientation?: 'horizontal' | 'vertical';
1085
+ inverted?: boolean;
1086
+ }
1087
+
1088
+ export interface TrackProps
1089
+ extends ComponentPropsWithoutRef<typeof View>,
1090
+ BaseProps {}
1091
+ export interface RangeProps
1092
+ extends ComponentPropsWithoutRef<typeof View>,
1093
+ BaseProps {}
1094
+ export interface ThumbProps
1095
+ extends ComponentPropsWithoutRef<typeof View>,
1096
+ BaseProps {}
1097
+
1098
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1099
+ export const Track: React.ForwardRefExoticComponent<TrackProps>;
1100
+ export const Range: React.ForwardRefExoticComponent<RangeProps>;
1101
+ export const Thumb: React.ForwardRefExoticComponent<ThumbProps>;
1102
+ }
1103
+
1104
+ // Switch
1105
+ declare module '@rn-primitives/switch' {
1106
+ import type { ComponentPropsWithoutRef } from 'react';
1107
+ import type { Pressable, View } from 'react-native';
1108
+
1109
+ export type RootRef = React.ElementRef<typeof Pressable>;
1110
+ export type ThumbRef = React.ElementRef<typeof View>;
1111
+
1112
+ interface BaseProps {
1113
+ asChild?: boolean;
1114
+ className?: string;
1115
+ children?: React.ReactNode;
1116
+ }
1117
+
1118
+ export interface RootProps
1119
+ extends ComponentPropsWithoutRef<typeof Pressable>,
1120
+ BaseProps {
1121
+ checked?: boolean;
1122
+ onCheckedChange?: (checked: boolean) => void;
1123
+ defaultChecked?: boolean;
1124
+ disabled?: boolean;
1125
+ required?: boolean;
1126
+ name?: string;
1127
+ value?: string;
1128
+ }
1129
+
1130
+ export interface ThumbProps
1131
+ extends ComponentPropsWithoutRef<typeof View>,
1132
+ BaseProps {}
1133
+
1134
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1135
+ export const Thumb: React.ForwardRefExoticComponent<ThumbProps>;
1136
+
1137
+ export function useRootContext(): { checked: boolean; disabled: boolean };
1138
+ }
1139
+
1140
+ // Tabs
1141
+ declare module '@rn-primitives/tabs' {
1142
+ import type { ComponentPropsWithoutRef } from 'react';
1143
+ import type { View, Pressable } from 'react-native';
1144
+
1145
+ export type RootRef = React.ElementRef<typeof View>;
1146
+ export type ListRef = React.ElementRef<typeof View>;
1147
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
1148
+ export type ContentRef = React.ElementRef<typeof View>;
1149
+
1150
+ interface BaseProps {
1151
+ asChild?: boolean;
1152
+ className?: string;
1153
+ children?: React.ReactNode;
1154
+ }
1155
+
1156
+ export interface RootProps
1157
+ extends ComponentPropsWithoutRef<typeof View>,
1158
+ BaseProps {
1159
+ value?: string;
1160
+ onValueChange?: (value: string) => void;
1161
+ defaultValue?: string;
1162
+ orientation?: 'horizontal' | 'vertical';
1163
+ dir?: 'ltr' | 'rtl';
1164
+ activationMode?: 'automatic' | 'manual';
1165
+ }
1166
+
1167
+ export interface ListProps
1168
+ extends ComponentPropsWithoutRef<typeof View>,
1169
+ BaseProps {}
1170
+
1171
+ export interface TriggerProps
1172
+ extends ComponentPropsWithoutRef<typeof Pressable>,
1173
+ BaseProps {
1174
+ value: string;
1175
+ disabled?: boolean;
1176
+ }
1177
+
1178
+ export interface ContentProps
1179
+ extends ComponentPropsWithoutRef<typeof View>,
1180
+ BaseProps {
1181
+ value: string;
1182
+ forceMount?: boolean;
1183
+ }
1184
+
1185
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1186
+ export const List: React.ForwardRefExoticComponent<ListProps>;
1187
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
1188
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
1189
+ }
1190
+
1191
+ // Toggle
1192
+ declare module '@rn-primitives/toggle' {
1193
+ import type { ComponentPropsWithoutRef } from 'react';
1194
+ import type { Pressable } from 'react-native';
1195
+
1196
+ export type RootRef = React.ElementRef<typeof Pressable>;
1197
+
1198
+ export interface RootProps
1199
+ extends ComponentPropsWithoutRef<typeof Pressable> {
1200
+ asChild?: boolean;
1201
+ className?: string;
1202
+ children?: React.ReactNode;
1203
+ pressed?: boolean;
1204
+ onPressedChange?: (pressed: boolean) => void;
1205
+ defaultPressed?: boolean;
1206
+ disabled?: boolean;
1207
+ }
1208
+
1209
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1210
+
1211
+ export function useRootContext(): { pressed: boolean; disabled: boolean };
1212
+ }
1213
+
1214
+ // Toggle Group
1215
+ declare module '@rn-primitives/toggle-group' {
1216
+ import type { ComponentPropsWithoutRef } from 'react';
1217
+ import type { View, Pressable } from 'react-native';
1218
+
1219
+ export type RootRef = React.ElementRef<typeof View>;
1220
+ export type ItemRef = React.ElementRef<typeof Pressable>;
1221
+
1222
+ interface BaseProps {
1223
+ asChild?: boolean;
1224
+ className?: string;
1225
+ children?: React.ReactNode;
1226
+ }
1227
+
1228
+ export interface RootSingleProps
1229
+ extends ComponentPropsWithoutRef<typeof View>,
1230
+ BaseProps {
1231
+ type: 'single';
1232
+ value?: string;
1233
+ onValueChange?: (value: string) => void;
1234
+ defaultValue?: string;
1235
+ disabled?: boolean;
1236
+ }
1237
+
1238
+ export interface RootMultipleProps
1239
+ extends ComponentPropsWithoutRef<typeof View>,
1240
+ BaseProps {
1241
+ type: 'multiple';
1242
+ value?: string[];
1243
+ onValueChange?: (value: string[]) => void;
1244
+ defaultValue?: string[];
1245
+ disabled?: boolean;
1246
+ }
1247
+
1248
+ export type RootProps = RootSingleProps | RootMultipleProps;
1249
+
1250
+ export interface ItemProps
1251
+ extends ComponentPropsWithoutRef<typeof Pressable>,
1252
+ BaseProps {
1253
+ value: string;
1254
+ disabled?: boolean;
1255
+ }
1256
+
1257
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1258
+ export const Item: React.ForwardRefExoticComponent<ItemProps>;
1259
+ }
1260
+
1261
+ // Tooltip
1262
+ declare module '@rn-primitives/tooltip' {
1263
+ import type { ComponentPropsWithoutRef } from 'react';
1264
+ import type { View, Pressable, Text } from 'react-native';
1265
+
1266
+ export type RootRef = React.ElementRef<typeof View>;
1267
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
1268
+ export type PortalRef = React.ElementRef<typeof View>;
1269
+ export type OverlayRef = React.ElementRef<typeof Pressable>;
1270
+ export type ContentRef = React.ElementRef<typeof View>;
1271
+ export type TextRef = React.ElementRef<typeof Text>;
1272
+
1273
+ interface BaseProps {
1274
+ asChild?: boolean;
1275
+ className?: string;
1276
+ children?: React.ReactNode;
1277
+ }
1278
+
1279
+ export interface RootProps extends BaseProps {
1280
+ open?: boolean;
1281
+ onOpenChange?: (open: boolean) => void;
1282
+ defaultOpen?: boolean;
1283
+ delayDuration?: number;
1284
+ skipDelayDuration?: number;
1285
+ disableHoverableContent?: boolean;
1286
+ }
1287
+ export interface TriggerProps
1288
+ extends ComponentPropsWithoutRef<typeof Pressable>,
1289
+ BaseProps {}
1290
+ export interface PortalProps extends BaseProps {}
1291
+ export interface OverlayProps
1292
+ extends ComponentPropsWithoutRef<typeof Pressable>,
1293
+ BaseProps {}
1294
+ export interface ContentProps
1295
+ extends ComponentPropsWithoutRef<typeof View>,
1296
+ BaseProps {
1297
+ align?: 'start' | 'center' | 'end';
1298
+ side?: 'top' | 'bottom' | 'left' | 'right';
1299
+ sideOffset?: number;
1300
+ alignOffset?: number;
1301
+ avoidCollisions?: boolean;
1302
+ }
1303
+ export interface TextProps
1304
+ extends ComponentPropsWithoutRef<typeof Text>,
1305
+ BaseProps {}
1306
+
1307
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1308
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
1309
+ export const Portal: React.ForwardRefExoticComponent<PortalProps>;
1310
+ export const Overlay: React.ForwardRefExoticComponent<OverlayProps>;
1311
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
1312
+ export const Text: React.ForwardRefExoticComponent<TextProps>;
1313
+ }
1314
+
1315
+ // Collapsible
1316
+ declare module '@rn-primitives/collapsible' {
1317
+ import type { ComponentPropsWithoutRef } from 'react';
1318
+ import type { View, Pressable } from 'react-native';
1319
+
1320
+ export type RootRef = React.ElementRef<typeof View>;
1321
+ export type TriggerRef = React.ElementRef<typeof Pressable>;
1322
+ export type ContentRef = React.ElementRef<typeof View>;
1323
+
1324
+ interface BaseProps {
1325
+ asChild?: boolean;
1326
+ className?: string;
1327
+ children?: React.ReactNode;
1328
+ }
1329
+
1330
+ export interface RootProps
1331
+ extends ComponentPropsWithoutRef<typeof View>,
1332
+ BaseProps {
1333
+ open?: boolean;
1334
+ onOpenChange?: (open: boolean) => void;
1335
+ defaultOpen?: boolean;
1336
+ disabled?: boolean;
1337
+ }
1338
+
1339
+ export interface TriggerProps
1340
+ extends ComponentPropsWithoutRef<typeof Pressable>,
1341
+ BaseProps {}
1342
+
1343
+ export interface ContentProps
1344
+ extends ComponentPropsWithoutRef<typeof View>,
1345
+ BaseProps {
1346
+ forceMount?: boolean;
1347
+ }
1348
+
1349
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1350
+ export const Trigger: React.ForwardRefExoticComponent<TriggerProps>;
1351
+ export const Content: React.ForwardRefExoticComponent<ContentProps>;
1352
+ }
1353
+
1354
+ // Avatar
1355
+ declare module '@rn-primitives/avatar' {
1356
+ import type { ComponentPropsWithoutRef } from 'react';
1357
+ import type { View, Image, Text } from 'react-native';
1358
+
1359
+ export type RootRef = React.ElementRef<typeof View>;
1360
+ export type ImageRef = React.ElementRef<typeof Image>;
1361
+ export type FallbackRef = React.ElementRef<typeof Text>;
1362
+
1363
+ interface BaseProps {
1364
+ asChild?: boolean;
1365
+ className?: string;
1366
+ children?: React.ReactNode;
1367
+ }
1368
+
1369
+ export interface RootProps
1370
+ extends ComponentPropsWithoutRef<typeof View>,
1371
+ BaseProps {}
1372
+
1373
+ export interface ImageProps
1374
+ extends ComponentPropsWithoutRef<typeof Image>,
1375
+ BaseProps {
1376
+ source: { uri: string } | number;
1377
+ }
1378
+
1379
+ export interface FallbackProps
1380
+ extends ComponentPropsWithoutRef<typeof Text>,
1381
+ BaseProps {}
1382
+
1383
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1384
+ export const Image: React.ForwardRefExoticComponent<ImageProps>;
1385
+ export const Fallback: React.ForwardRefExoticComponent<FallbackProps>;
1386
+ }
1387
+
1388
+ // Aspect Ratio
1389
+ declare module '@rn-primitives/aspect-ratio' {
1390
+ import type { ComponentPropsWithoutRef } from 'react';
1391
+ import type { View } from 'react-native';
1392
+
1393
+ export type RootRef = React.ElementRef<typeof View>;
1394
+
1395
+ export interface RootProps extends ComponentPropsWithoutRef<typeof View> {
1396
+ asChild?: boolean;
1397
+ className?: string;
1398
+ children?: React.ReactNode;
1399
+ ratio?: number;
1400
+ }
1401
+
1402
+ export const Root: React.ForwardRefExoticComponent<RootProps>;
1403
+ }
1404
+
1405
+ // Portal
1406
+ declare module '@rn-primitives/portal' {
45
1407
  import type { ReactNode } from 'react';
46
- export namespace Dialog {
47
- interface OverlayProps {
48
- children?: ReactNode;
49
- className?: string;
50
- }
51
- interface ContentProps {
52
- children?: ReactNode;
53
- className?: string;
54
- }
55
- interface TitleProps {
56
- children?: ReactNode;
57
- className?: string;
58
- }
59
- interface DescriptionProps {
60
- children?: ReactNode;
61
- className?: string;
62
- }
63
- interface CloseProps {
64
- children?: ReactNode;
65
- className?: string;
66
- }
1408
+
1409
+ export interface PortalProps {
1410
+ name?: string;
1411
+ children?: ReactNode;
67
1412
  }
1413
+
1414
+ export interface PortalHostProps {
1415
+ name?: string;
1416
+ }
1417
+
1418
+ export const Portal: React.FC<PortalProps>;
1419
+ export const PortalHost: React.FC<PortalHostProps>;
1420
+ export function usePortal(name?: string): {
1421
+ addPortal: (children: ReactNode) => string;
1422
+ removePortal: (key: string) => void;
1423
+ updatePortal: (key: string, children: ReactNode) => void;
1424
+ };
68
1425
  }
69
1426
 
70
1427
  export {};