@gv-tech/ui-native 2.23.2 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/__contracts.d.ts +2 -0
  2. package/dist/__contracts.d.ts.map +1 -0
  3. package/dist/accordion.d.ts +4 -4
  4. package/dist/accordion.d.ts.map +1 -1
  5. package/dist/alert-dialog.d.ts +6 -6
  6. package/dist/alert-dialog.d.ts.map +1 -1
  7. package/dist/avatar.d.ts +3 -3
  8. package/dist/avatar.d.ts.map +1 -1
  9. package/dist/button.d.ts +2 -2
  10. package/dist/button.d.ts.map +1 -1
  11. package/dist/dialog.d.ts +4 -4
  12. package/dist/dialog.d.ts.map +1 -1
  13. package/dist/drawer.d.ts +1 -1
  14. package/dist/drawer.d.ts.map +1 -1
  15. package/dist/form.d.ts +3 -1
  16. package/dist/form.d.ts.map +1 -1
  17. package/dist/index.d.ts +2 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/sheet.d.ts +4 -4
  20. package/dist/sheet.d.ts.map +1 -1
  21. package/dist/tooltip.d.ts +1 -1
  22. package/dist/tooltip.d.ts.map +1 -1
  23. package/dist/ui-native.cjs +2 -2
  24. package/dist/{ui-native.mjs → ui-native.esm.js} +887 -880
  25. package/package.json +4 -4
  26. package/src/__contracts.ts +880 -0
  27. package/src/accordion.tsx +10 -10
  28. package/src/alert-dialog.tsx +12 -12
  29. package/src/alert.tsx +3 -3
  30. package/src/avatar.tsx +6 -6
  31. package/src/button.tsx +5 -1
  32. package/src/card.tsx +6 -6
  33. package/src/carousel.tsx +2 -2
  34. package/src/checkbox.tsx +1 -1
  35. package/src/context-menu.tsx +9 -9
  36. package/src/dialog.tsx +4 -4
  37. package/src/drawer.tsx +12 -12
  38. package/src/dropdown-menu.tsx +11 -11
  39. package/src/form.tsx +6 -6
  40. package/src/hover-card.tsx +1 -1
  41. package/src/index.ts +2 -1
  42. package/src/input.tsx +1 -1
  43. package/src/label.tsx +1 -1
  44. package/src/menubar.tsx +17 -17
  45. package/src/navigation-menu.tsx +8 -8
  46. package/src/popover.tsx +4 -4
  47. package/src/progress.tsx +1 -1
  48. package/src/radio-group.tsx +2 -2
  49. package/src/search.tsx +1 -1
  50. package/src/select.tsx +7 -7
  51. package/src/separator.tsx +1 -1
  52. package/src/sheet.tsx +4 -4
  53. package/src/switch.tsx +1 -1
  54. package/src/table.tsx +8 -8
  55. package/src/tabs.tsx +4 -4
  56. package/src/text.tsx +1 -1
  57. package/src/textarea.tsx +1 -1
  58. package/src/toast.tsx +5 -5
  59. package/src/toggle-group.tsx +2 -2
  60. package/src/toggle.tsx +1 -1
  61. package/src/tooltip.tsx +2 -2
@@ -8,7 +8,7 @@ export const HoverCard = HoverCardPrimitive.Root;
8
8
  export const HoverCardTrigger = HoverCardPrimitive.Trigger;
9
9
 
10
10
  export const HoverCardContent = React.forwardRef<
11
- React.ElementRef<typeof HoverCardPrimitive.Content>,
11
+ React.ComponentRef<typeof HoverCardPrimitive.Content>,
12
12
  HoverCardContentBaseProps
13
13
  >(({ className, children, ...props }, ref) => {
14
14
  return (
package/src/index.ts CHANGED
@@ -158,7 +158,8 @@ export {
158
158
  } from './dropdown-menu';
159
159
 
160
160
  // Form
161
- export { Form } from './form';
161
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from './form';
162
+ export type { FormControlProps, FormDescriptionProps, FormItemProps, FormLabelProps, FormMessageProps } from './form';
162
163
 
163
164
  // Hover Card
164
165
  export { HoverCard, HoverCardContent, HoverCardTrigger } from './hover-card';
package/src/input.tsx CHANGED
@@ -6,7 +6,7 @@ import { cn } from './lib/utils';
6
6
 
7
7
  export interface InputProps extends React.ComponentPropsWithoutRef<typeof TextInput>, InputBaseProps {}
8
8
 
9
- const Input = React.forwardRef<React.ElementRef<typeof TextInput>, InputProps>(
9
+ const Input = React.forwardRef<React.ComponentRef<typeof TextInput>, InputProps>(
10
10
  ({ className, placeholderClassName, ...props }, ref) => {
11
11
  return (
12
12
  <TextInput
package/src/label.tsx CHANGED
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import { cn } from './lib/utils';
5
5
 
6
6
  const Label = React.forwardRef<
7
- React.ElementRef<typeof LabelPrimitive.Text>,
7
+ React.ComponentRef<typeof LabelPrimitive.Text>,
8
8
  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Text>
9
9
  >(({ className, onPress, onLongPress, onPressIn, onPressOut, ...props }, ref) => (
10
10
  <LabelPrimitive.Root
package/src/menubar.tsx CHANGED
@@ -20,7 +20,7 @@ import { wrapTextChildren } from './lib/render-native';
20
20
  import { cn } from './lib/utils';
21
21
  import { Text } from './text';
22
22
 
23
- export const Menubar = React.forwardRef<React.ElementRef<typeof MenubarPrimitive.Root>, MenubarBaseProps>(
23
+ export const Menubar = React.forwardRef<React.ComponentRef<typeof MenubarPrimitive.Root>, MenubarBaseProps>(
24
24
  ({ className, children, value: valueProp, onValueChange: onValueChangeProp, ...props }, ref) => {
25
25
  const [localValue, setLocalValue] = React.useState<string | undefined>(valueProp || '');
26
26
  const value = valueProp !== undefined ? valueProp : localValue;
@@ -58,7 +58,7 @@ export const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
58
58
  export const MenubarSub = MenubarPrimitive.Sub;
59
59
 
60
60
  const MenubarOverlay = React.forwardRef<
61
- React.ElementRef<typeof MenubarPrimitive.Overlay>,
61
+ React.ComponentRef<typeof MenubarPrimitive.Overlay>,
62
62
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Overlay>
63
63
  >(({ className, ...props }, ref) => {
64
64
  return (
@@ -74,7 +74,7 @@ const MenubarOverlay = React.forwardRef<
74
74
  MenubarOverlay.displayName = 'MenubarOverlay';
75
75
 
76
76
  export const MenubarTrigger = React.forwardRef<
77
- React.ElementRef<typeof MenubarPrimitive.Trigger>,
77
+ React.ComponentRef<typeof MenubarPrimitive.Trigger>,
78
78
  MenubarTriggerBaseProps
79
79
  >(({ className, children, ...props }, ref) => {
80
80
  return (
@@ -86,14 +86,14 @@ export const MenubarTrigger = React.forwardRef<
86
86
  )}
87
87
  {...props}
88
88
  >
89
- {wrapTextChildren(children, Text)}
89
+ {wrapTextChildren(children as React.ReactNode, Text)}
90
90
  </MenubarPrimitive.Trigger>
91
91
  );
92
92
  });
93
93
  MenubarTrigger.displayName = 'MenubarTrigger';
94
94
 
95
95
  export const MenubarContent = React.forwardRef<
96
- React.ElementRef<typeof MenubarPrimitive.Content>,
96
+ React.ComponentRef<typeof MenubarPrimitive.Content>,
97
97
  MenubarContentBaseProps
98
98
  >(({ className, children, ...props }, ref) => {
99
99
  return (
@@ -114,7 +114,7 @@ export const MenubarContent = React.forwardRef<
114
114
  });
115
115
  MenubarContent.displayName = 'MenubarContent';
116
116
 
117
- export const MenubarItem = React.forwardRef<React.ElementRef<typeof MenubarPrimitive.Item>, MenubarItemBaseProps>(
117
+ export const MenubarItem = React.forwardRef<React.ComponentRef<typeof MenubarPrimitive.Item>, MenubarItemBaseProps>(
118
118
  ({ className, children, inset, ...props }, ref) => {
119
119
  return (
120
120
  <MenubarPrimitive.Item
@@ -126,7 +126,7 @@ export const MenubarItem = React.forwardRef<React.ElementRef<typeof MenubarPrimi
126
126
  )}
127
127
  {...props}
128
128
  >
129
- {wrapTextChildren(children, Text)}
129
+ {wrapTextChildren(children as React.ReactNode, Text)}
130
130
  </MenubarPrimitive.Item>
131
131
  );
132
132
  },
@@ -134,7 +134,7 @@ export const MenubarItem = React.forwardRef<React.ElementRef<typeof MenubarPrimi
134
134
  MenubarItem.displayName = 'MenubarItem';
135
135
 
136
136
  export const MenubarCheckboxItem = React.forwardRef<
137
- React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
137
+ React.ComponentRef<typeof MenubarPrimitive.CheckboxItem>,
138
138
  MenubarCheckboxItemBaseProps
139
139
  >(({ className, children, checked, onCheckedChange, ...props }, ref) => {
140
140
  return (
@@ -153,14 +153,14 @@ export const MenubarCheckboxItem = React.forwardRef<
153
153
  <Check size={14} className="text-foreground" />
154
154
  </MenubarPrimitive.ItemIndicator>
155
155
  </View>
156
- {wrapTextChildren(children, Text)}
156
+ {wrapTextChildren(children as React.ReactNode, Text)}
157
157
  </MenubarPrimitive.CheckboxItem>
158
158
  );
159
159
  });
160
160
  MenubarCheckboxItem.displayName = 'MenubarCheckboxItem';
161
161
 
162
162
  export const MenubarRadioItem = React.forwardRef<
163
- React.ElementRef<typeof MenubarPrimitive.RadioItem>,
163
+ React.ComponentRef<typeof MenubarPrimitive.RadioItem>,
164
164
  MenubarRadioItemBaseProps
165
165
  >(({ className, children, value, ...props }, ref) => {
166
166
  return (
@@ -178,13 +178,13 @@ export const MenubarRadioItem = React.forwardRef<
178
178
  <Circle size={8} className="text-foreground fill-current" />
179
179
  </MenubarPrimitive.ItemIndicator>
180
180
  </View>
181
- {wrapTextChildren(children, Text)}
181
+ {wrapTextChildren(children as React.ReactNode, Text)}
182
182
  </MenubarPrimitive.RadioItem>
183
183
  );
184
184
  });
185
185
  MenubarRadioItem.displayName = 'MenubarRadioItem';
186
186
 
187
- export const MenubarLabel = React.forwardRef<React.ElementRef<typeof MenubarPrimitive.Label>, MenubarLabelBaseProps>(
187
+ export const MenubarLabel = React.forwardRef<React.ComponentRef<typeof MenubarPrimitive.Label>, MenubarLabelBaseProps>(
188
188
  ({ className, children, inset, ...props }, ref) => {
189
189
  return (
190
190
  <MenubarPrimitive.Label
@@ -192,7 +192,7 @@ export const MenubarLabel = React.forwardRef<React.ElementRef<typeof MenubarPrim
192
192
  className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
193
193
  {...props}
194
194
  >
195
- {wrapTextChildren(children, Text)}
195
+ {wrapTextChildren(children as React.ReactNode, Text)}
196
196
  </MenubarPrimitive.Label>
197
197
  );
198
198
  },
@@ -200,7 +200,7 @@ export const MenubarLabel = React.forwardRef<React.ElementRef<typeof MenubarPrim
200
200
  MenubarLabel.displayName = 'MenubarLabel';
201
201
 
202
202
  export const MenubarSeparator = React.forwardRef<
203
- React.ElementRef<typeof MenubarPrimitive.Separator>,
203
+ React.ComponentRef<typeof MenubarPrimitive.Separator>,
204
204
  MenubarSeparatorBaseProps
205
205
  >(({ className, ...props }, ref) => {
206
206
  return <MenubarPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />;
@@ -217,7 +217,7 @@ export const MenubarShortcut = ({ className, children, ...props }: MenubarShortc
217
217
  MenubarShortcut.displayName = 'MenubarShortcut';
218
218
 
219
219
  export const MenubarSubTrigger = React.forwardRef<
220
- React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
220
+ React.ComponentRef<typeof MenubarPrimitive.SubTrigger>,
221
221
  MenubarSubTriggerBaseProps
222
222
  >(({ className, children, inset, ...props }, ref) => {
223
223
  return (
@@ -230,7 +230,7 @@ export const MenubarSubTrigger = React.forwardRef<
230
230
  )}
231
231
  {...props}
232
232
  >
233
- <View className="flex flex-row items-center gap-1.5">{wrapTextChildren(children, Text)}</View>
233
+ <View className="flex flex-row items-center gap-1.5">{wrapTextChildren(children as React.ReactNode, Text)}</View>
234
234
  <ChevronRight size={14} className="text-foreground ml-auto" />
235
235
  </MenubarPrimitive.SubTrigger>
236
236
  );
@@ -238,7 +238,7 @@ export const MenubarSubTrigger = React.forwardRef<
238
238
  MenubarSubTrigger.displayName = 'MenubarSubTrigger';
239
239
 
240
240
  export const MenubarSubContent = React.forwardRef<
241
- React.ElementRef<typeof MenubarPrimitive.SubContent>,
241
+ React.ComponentRef<typeof MenubarPrimitive.SubContent>,
242
242
  MenubarSubContentBaseProps
243
243
  >(({ className, children, ...props }, ref) => {
244
244
  return (
@@ -16,7 +16,7 @@ import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
16
16
  import { cn } from './lib/utils';
17
17
 
18
18
  export const NavigationMenu = React.forwardRef<
19
- React.ElementRef<typeof NavigationMenuPrimitive.Root>,
19
+ React.ComponentRef<typeof NavigationMenuPrimitive.Root>,
20
20
  NavigationMenuBaseProps
21
21
  >(
22
22
  (
@@ -41,7 +41,7 @@ export const NavigationMenu = React.forwardRef<
41
41
  NavigationMenu.displayName = 'NavigationMenu';
42
42
 
43
43
  export const NavigationMenuList = React.forwardRef<
44
- React.ElementRef<typeof NavigationMenuPrimitive.List>,
44
+ React.ComponentRef<typeof NavigationMenuPrimitive.List>,
45
45
  NavigationMenuListBaseProps
46
46
  >(({ className, children, ...props }, ref) => {
47
47
  return (
@@ -57,7 +57,7 @@ export const NavigationMenuList = React.forwardRef<
57
57
  NavigationMenuList.displayName = 'NavigationMenuList';
58
58
 
59
59
  export const NavigationMenuItem = React.forwardRef<
60
- React.ElementRef<typeof NavigationMenuPrimitive.Item>,
60
+ React.ComponentRef<typeof NavigationMenuPrimitive.Item>,
61
61
  NavigationMenuItemBaseProps
62
62
  >(({ className, children, value, ...props }, ref) => {
63
63
  return (
@@ -69,7 +69,7 @@ export const NavigationMenuItem = React.forwardRef<
69
69
  NavigationMenuItem.displayName = 'NavigationMenuItem';
70
70
 
71
71
  export const NavigationMenuTrigger = React.forwardRef<
72
- React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
72
+ React.ComponentRef<typeof NavigationMenuPrimitive.Trigger>,
73
73
  NavigationMenuTriggerBaseProps
74
74
  >(({ className, children, disabled, ...props }, ref) => {
75
75
  return (
@@ -93,7 +93,7 @@ export const NavigationMenuTrigger = React.forwardRef<
93
93
  NavigationMenuTrigger.displayName = 'NavigationMenuTrigger';
94
94
 
95
95
  export const NavigationMenuContent = React.forwardRef<
96
- React.ElementRef<typeof NavigationMenuPrimitive.Content>,
96
+ React.ComponentRef<typeof NavigationMenuPrimitive.Content>,
97
97
  NavigationMenuContentBaseProps
98
98
  >(({ className, children, forceMount, ...props }, ref) => {
99
99
  return (
@@ -113,7 +113,7 @@ export const NavigationMenuContent = React.forwardRef<
113
113
  NavigationMenuContent.displayName = 'NavigationMenuContent';
114
114
 
115
115
  export const NavigationMenuLink = React.forwardRef<
116
- React.ElementRef<typeof NavigationMenuPrimitive.Link>,
116
+ React.ComponentRef<typeof NavigationMenuPrimitive.Link>,
117
117
  NavigationMenuLinkBaseProps & { onPress?: () => void }
118
118
  >(({ className, children, active, onSelect, onPress, href, ...props }, ref) => {
119
119
  const handlePress = (e: GestureResponderEvent) => {
@@ -144,7 +144,7 @@ export const NavigationMenuLink = React.forwardRef<
144
144
  NavigationMenuLink.displayName = 'NavigationMenuLink';
145
145
 
146
146
  export const NavigationMenuViewport = React.forwardRef<
147
- React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
147
+ React.ComponentRef<typeof NavigationMenuPrimitive.Viewport>,
148
148
  NavigationMenuViewportBaseProps
149
149
  >(({ className, forceMount, ...props }, ref) => {
150
150
  return (
@@ -163,7 +163,7 @@ export const NavigationMenuViewport = React.forwardRef<
163
163
  NavigationMenuViewport.displayName = 'NavigationMenuViewport';
164
164
 
165
165
  export const NavigationMenuIndicator = React.forwardRef<
166
- React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
166
+ React.ComponentRef<typeof NavigationMenuPrimitive.Indicator>,
167
167
  NavigationMenuIndicatorBaseProps
168
168
  >(({ className, forceMount, ...props }, ref) => {
169
169
  return (
package/src/popover.tsx CHANGED
@@ -18,7 +18,7 @@ const PopoverContext = React.createContext<{
18
18
  });
19
19
 
20
20
  const Popover = React.forwardRef<
21
- React.ElementRef<typeof View>,
21
+ React.ComponentRef<typeof View>,
22
22
  React.ComponentPropsWithoutRef<typeof View> & PopoverBaseProps
23
23
  >(({ children, open, onOpenChange, ...props }, ref) => {
24
24
  const [internalOpen, setInternalOpen] = React.useState(false);
@@ -37,7 +37,7 @@ const Popover = React.forwardRef<
37
37
  Popover.displayName = 'Popover';
38
38
 
39
39
  const PopoverTrigger = React.forwardRef<
40
- React.ElementRef<typeof Pressable>,
40
+ React.ComponentRef<typeof Pressable>,
41
41
  React.ComponentPropsWithoutRef<typeof Pressable> & PopoverTriggerBaseProps
42
42
  >(({ children, ...props }, ref) => {
43
43
  const { setOpen } = React.useContext(PopoverContext);
@@ -51,13 +51,13 @@ const PopoverTrigger = React.forwardRef<
51
51
  PopoverTrigger.displayName = 'PopoverTrigger';
52
52
 
53
53
  const PopoverAnchor = React.forwardRef<
54
- React.ElementRef<typeof View>,
54
+ React.ComponentRef<typeof View>,
55
55
  React.ComponentPropsWithoutRef<typeof View> & PopoverAnchorBaseProps
56
56
  >(({ ...props }, ref) => <View ref={ref} {...props} />);
57
57
  PopoverAnchor.displayName = 'PopoverAnchor';
58
58
 
59
59
  const PopoverContent = React.forwardRef<
60
- React.ElementRef<typeof View>,
60
+ React.ComponentRef<typeof View>,
61
61
  React.ComponentPropsWithoutRef<typeof View> & PopoverContentBaseProps
62
62
  >(({ className, children, ...props }, ref) => {
63
63
  const { open, setOpen } = React.useContext(PopoverContext);
package/src/progress.tsx CHANGED
@@ -5,7 +5,7 @@ import { View } from 'react-native';
5
5
  import { cn } from './lib/utils';
6
6
 
7
7
  const Progress = React.forwardRef<
8
- React.ElementRef<typeof View>,
8
+ React.ComponentRef<typeof View>,
9
9
  React.ComponentPropsWithoutRef<typeof View> & ProgressBaseProps
10
10
  >(({ className, value, ...props }, ref) => (
11
11
  <View
@@ -8,7 +8,7 @@ import { cn } from './lib/utils';
8
8
  export interface RadioGroupProps
9
9
  extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, RadioGroupBaseProps {}
10
10
 
11
- const RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(
11
+ const RadioGroup = React.forwardRef<React.ComponentRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(
12
12
  ({ className, ...props }, ref) => {
13
13
  return <RadioGroupPrimitive.Root className={cn('web:grid gap-2', className)} {...props} ref={ref} />;
14
14
  },
@@ -18,7 +18,7 @@ RadioGroup.displayName = RadioGroupPrimitive.Root?.displayName || 'RadioGroup';
18
18
  export interface RadioGroupItemProps
19
19
  extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, 'disabled'>, RadioGroupItemBaseProps {}
20
20
 
21
- const RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(
21
+ const RadioGroupItem = React.forwardRef<React.ComponentRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(
22
22
  ({ className, ...props }, ref) => {
23
23
  return (
24
24
  <RadioGroupPrimitive.Item
package/src/search.tsx CHANGED
@@ -34,7 +34,7 @@ export function Search({ children, open: customOpen, onOpenChange }: SearchProps
34
34
  export interface SearchTriggerProps
35
35
  extends Omit<React.ComponentPropsWithoutRef<typeof Button>, 'variant'>, SearchTriggerBaseProps {}
36
36
 
37
- export const SearchTrigger = React.forwardRef<React.ElementRef<typeof Button>, SearchTriggerProps>(
37
+ export const SearchTrigger = React.forwardRef<React.ComponentRef<typeof Button>, SearchTriggerProps>(
38
38
  ({ className, placeholder, variant = 'default', responsive = false, ...props }, ref) => {
39
39
  const defaultPlaceholder = variant === 'compact' ? 'Search...' : 'Search docs...';
40
40
  const activePlaceholder = placeholder || defaultPlaceholder;
package/src/select.tsx CHANGED
@@ -43,7 +43,7 @@ export interface SelectTriggerProps
43
43
  Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, 'children' | 'disabled'>,
44
44
  SelectTriggerBaseProps {}
45
45
 
46
- const SelectTrigger = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(
46
+ const SelectTrigger = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(
47
47
  ({ className, children, ...props }, ref) => (
48
48
  <SelectPrimitive.Trigger
49
49
  ref={ref}
@@ -65,7 +65,7 @@ export interface SelectScrollUpButtonProps
65
65
  extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>, SelectScrollUpButtonBaseProps {}
66
66
 
67
67
  const SelectScrollUpButton = React.forwardRef<
68
- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
68
+ React.ComponentRef<typeof SelectPrimitive.ScrollUpButton>,
69
69
  SelectScrollUpButtonProps
70
70
  >(({ className, ...props }, ref) => (
71
71
  <SelectPrimitive.ScrollUpButton
@@ -85,7 +85,7 @@ export interface SelectScrollDownButtonProps
85
85
  extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>, SelectScrollDownButtonBaseProps {}
86
86
 
87
87
  const SelectScrollDownButton = React.forwardRef<
88
- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
88
+ React.ComponentRef<typeof SelectPrimitive.ScrollDownButton>,
89
89
  SelectScrollDownButtonProps
90
90
  >(({ className, ...props }, ref) => (
91
91
  <SelectPrimitive.ScrollDownButton
@@ -109,7 +109,7 @@ export interface SelectContentProps
109
109
  overlayStyle?: ViewStyle;
110
110
  }
111
111
 
112
- const SelectContent = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Content>, SelectContentProps>(
112
+ const SelectContent = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Content>, SelectContentProps>(
113
113
  ({ className, children, position = 'popper', portalHost, overlayClassName, overlayStyle, ...props }, ref) => {
114
114
  const { open } = SelectPrimitive.useRootContext();
115
115
 
@@ -151,7 +151,7 @@ SelectContent.displayName = SelectPrimitive.Content?.displayName || 'SelectConte
151
151
  export interface SelectLabelProps
152
152
  extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>, SelectLabelBaseProps {}
153
153
 
154
- const SelectLabel = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Label>, SelectLabelProps>(
154
+ const SelectLabel = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Label>, SelectLabelProps>(
155
155
  ({ className, ...props }, ref) => (
156
156
  <SelectPrimitive.Label
157
157
  ref={ref}
@@ -169,7 +169,7 @@ export interface SelectItemProps
169
169
  label?: string;
170
170
  }
171
171
 
172
- const SelectItem = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Item>, SelectItemProps>(
172
+ const SelectItem = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Item>, SelectItemProps>(
173
173
  ({ className, children, label, ...props }, ref) => {
174
174
  const itemLabel = label || (typeof children === 'string' ? children : '');
175
175
  return (
@@ -204,7 +204,7 @@ SelectItem.displayName = SelectPrimitive.Item?.displayName || 'SelectItem';
204
204
  export interface SelectSeparatorProps
205
205
  extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>, SelectSeparatorBaseProps {}
206
206
 
207
- const SelectSeparator = React.forwardRef<React.ElementRef<typeof SelectPrimitive.Separator>, SelectSeparatorProps>(
207
+ const SelectSeparator = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Separator>, SelectSeparatorProps>(
208
208
  ({ className, ...props }, ref) => (
209
209
  <SelectPrimitive.Separator
210
210
  ref={ref}
package/src/separator.tsx CHANGED
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import { cn } from './lib/utils';
5
5
 
6
6
  const Separator = React.forwardRef<
7
- React.ElementRef<typeof SeparatorPrimitive.Root>,
7
+ React.ComponentRef<typeof SeparatorPrimitive.Root>,
8
8
  React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
9
9
  >(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (
10
10
  <SeparatorPrimitive.Root
package/src/sheet.tsx CHANGED
@@ -16,7 +16,7 @@ const SheetClose = DialogPrimitive.Close;
16
16
 
17
17
  const SheetPortal = DialogPrimitive.Portal;
18
18
 
19
- export type SheetOverlayRef = React.ElementRef<typeof DialogPrimitive.Overlay>;
19
+ export type SheetOverlayRef = React.ComponentRef<typeof DialogPrimitive.Overlay>;
20
20
  export type SheetOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
21
21
  const SheetOverlay: React.ForwardRefExoticComponent<SheetOverlayProps & React.RefAttributes<SheetOverlayRef>> =
22
22
  React.forwardRef<SheetOverlayRef, SheetOverlayProps>(({ className, ...props }, ref) => {
@@ -37,7 +37,7 @@ const SheetOverlay: React.ForwardRefExoticComponent<SheetOverlayProps & React.Re
37
37
  });
38
38
  SheetOverlay.displayName = DialogPrimitive.Overlay?.displayName || 'SheetOverlay';
39
39
 
40
- export type SheetContentRef = React.ElementRef<typeof DialogPrimitive.Content>;
40
+ export type SheetContentRef = React.ComponentRef<typeof DialogPrimitive.Content>;
41
41
  export type SheetContentProps = DialogContentProps & {
42
42
  side?: 'top' | 'right' | 'bottom' | 'left';
43
43
  overlayClassName?: string;
@@ -99,7 +99,7 @@ const SheetFooter = ({ className, ...props }: React.ComponentPropsWithoutRef<typ
99
99
  );
100
100
  SheetFooter.displayName = 'SheetFooter';
101
101
 
102
- export type SheetTitleRef = React.ElementRef<typeof DialogPrimitive.Title>;
102
+ export type SheetTitleRef = React.ComponentRef<typeof DialogPrimitive.Title>;
103
103
  export type SheetTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
104
104
  const SheetTitle: React.ForwardRefExoticComponent<SheetTitleProps & React.RefAttributes<SheetTitleRef>> =
105
105
  React.forwardRef<SheetTitleRef, SheetTitleProps>(({ className, ...props }, ref) => (
@@ -107,7 +107,7 @@ const SheetTitle: React.ForwardRefExoticComponent<SheetTitleProps & React.RefAtt
107
107
  ));
108
108
  SheetTitle.displayName = DialogPrimitive.Title?.displayName || 'SheetTitle';
109
109
 
110
- export type SheetDescriptionRef = React.ElementRef<typeof DialogPrimitive.Description>;
110
+ export type SheetDescriptionRef = React.ComponentRef<typeof DialogPrimitive.Description>;
111
111
  export type SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
112
112
  const SheetDescription: React.ForwardRefExoticComponent<
113
113
  SheetDescriptionProps & React.RefAttributes<SheetDescriptionRef>
package/src/switch.tsx CHANGED
@@ -9,7 +9,7 @@ export interface SwitchProps
9
9
  Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, 'checked' | 'onCheckedChange'>,
10
10
  SwitchBaseProps {}
11
11
 
12
- const Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitive.Root>, SwitchProps>(
12
+ const Switch = React.forwardRef<React.ComponentRef<typeof SwitchPrimitive.Root>, SwitchProps>(
13
13
  ({ className, checked, onCheckedChange, ...props }, ref) => (
14
14
  <SwitchPrimitive.Root
15
15
  className={cn(
package/src/table.tsx CHANGED
@@ -4,31 +4,31 @@ import { View } from 'react-native';
4
4
  import { cn } from './lib/utils';
5
5
  import { Text } from './text';
6
6
 
7
- const Table = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
7
+ const Table = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
8
8
  ({ className, ...props }, ref) => (
9
9
  <View ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />
10
10
  ),
11
11
  );
12
12
  Table.displayName = 'Table';
13
13
 
14
- const TableHeader = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
14
+ const TableHeader = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
15
15
  ({ className, ...props }, ref) => <View ref={ref} className={cn('border-border border-b', className)} {...props} />,
16
16
  );
17
17
  TableHeader.displayName = 'TableHeader';
18
18
 
19
- const TableBody = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
19
+ const TableBody = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
20
20
  ({ className, ...props }, ref) => <View ref={ref} className={cn('flex-1', className)} {...props} />,
21
21
  );
22
22
  TableBody.displayName = 'TableBody';
23
23
 
24
- const TableFooter = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
24
+ const TableFooter = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
25
25
  ({ className, ...props }, ref) => (
26
26
  <View ref={ref} className={cn('bg-muted/50 font-medium [&>tr]:last:border-b-0', className)} {...props} />
27
27
  ),
28
28
  );
29
29
  TableFooter.displayName = 'TableFooter';
30
30
 
31
- const TableRow = React.forwardRef<React.ElementRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
31
+ const TableRow = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
32
32
  ({ className, ...props }, ref) => (
33
33
  <View
34
34
  ref={ref}
@@ -42,7 +42,7 @@ const TableRow = React.forwardRef<React.ElementRef<typeof View>, React.Component
42
42
  );
43
43
  TableRow.displayName = 'TableRow';
44
44
 
45
- const TableHead = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
45
+ const TableHead = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
46
46
  ({ className, ...props }, ref) => (
47
47
  <Text
48
48
  ref={ref}
@@ -56,14 +56,14 @@ const TableHead = React.forwardRef<React.ElementRef<typeof Text>, React.Componen
56
56
  );
57
57
  TableHead.displayName = 'TableHead';
58
58
 
59
- const TableCell = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
59
+ const TableCell = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
60
60
  ({ className, ...props }, ref) => (
61
61
  <Text ref={ref} className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)} {...props} />
62
62
  ),
63
63
  );
64
64
  TableCell.displayName = 'TableCell';
65
65
 
66
- const TableCaption = React.forwardRef<React.ElementRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
66
+ const TableCaption = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
67
67
  ({ className, ...props }, ref) => (
68
68
  <Text ref={ref} className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />
69
69
  ),
package/src/tabs.tsx CHANGED
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import { cn } from './lib/utils';
6
6
  import { TextClassContext } from './text';
7
7
 
8
- const Tabs = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Root>, TabsProps>((props, ref) => (
8
+ const Tabs = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Root>, TabsProps>((props, ref) => (
9
9
  <TabsPrimitive.Root ref={ref} {...props} />
10
10
  ));
11
11
  Tabs.displayName = 'Tabs';
@@ -20,7 +20,7 @@ export interface TabsTriggerProps
20
20
  export interface TabsContentProps
21
21
  extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>, TabsContentBaseProps {}
22
22
 
23
- const TabsList = React.forwardRef<React.ElementRef<typeof TabsPrimitive.List>, TabsListProps>(
23
+ const TabsList = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.List>, TabsListProps>(
24
24
  ({ className, ...props }, ref) => (
25
25
  <TabsPrimitive.List
26
26
  ref={ref}
@@ -34,7 +34,7 @@ const TabsList = React.forwardRef<React.ElementRef<typeof TabsPrimitive.List>, T
34
34
  );
35
35
  TabsList.displayName = TabsPrimitive.List?.displayName || 'TabsList';
36
36
 
37
- const TabsTrigger = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Trigger>, TabsTriggerProps>(
37
+ const TabsTrigger = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Trigger>, TabsTriggerProps>(
38
38
  ({ className, ...props }, ref) => {
39
39
  const { value } = TabsPrimitive.useRootContext();
40
40
  return (
@@ -60,7 +60,7 @@ const TabsTrigger = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Trigg
60
60
  );
61
61
  TabsTrigger.displayName = TabsPrimitive.Trigger?.displayName || 'TabsTrigger';
62
62
 
63
- const TabsContent = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Content>, TabsContentProps>(
63
+ const TabsContent = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Content>, TabsContentProps>(
64
64
  ({ className, ...props }, ref) => (
65
65
  <TabsPrimitive.Content
66
66
  ref={ref}
package/src/text.tsx CHANGED
@@ -29,7 +29,7 @@ const textVariants = cva('text-foreground', {
29
29
  export interface TextProps
30
30
  extends React.ComponentPropsWithoutRef<typeof RNText>, VariantProps<typeof textVariants>, TextBaseProps {}
31
31
 
32
- const Text = React.forwardRef<React.ElementRef<typeof RNText>, TextProps>(
32
+ const Text = React.forwardRef<React.ComponentRef<typeof RNText>, TextProps>(
33
33
  ({ className, variant = 'body', children, ...props }, ref) => {
34
34
  return (
35
35
  <RNText ref={ref} className={cn(textVariants({ variant, className }))} {...props}>
package/src/textarea.tsx CHANGED
@@ -5,7 +5,7 @@ import { cn } from './lib/utils';
5
5
 
6
6
  export type TextareaProps = React.ComponentPropsWithoutRef<typeof TextInput>;
7
7
 
8
- const Textarea = React.forwardRef<React.ElementRef<typeof TextInput>, TextareaProps>(
8
+ const Textarea = React.forwardRef<React.ComponentRef<typeof TextInput>, TextareaProps>(
9
9
  ({ className, placeholderClassName, ...props }, ref) => {
10
10
  return (
11
11
  <TextInput
package/src/toast.tsx CHANGED
@@ -11,7 +11,7 @@ const ToastProvider = ({ children }: { children: React.ReactNode }) => <>{childr
11
11
  const ToastViewport = () => null;
12
12
 
13
13
  const Toast = React.forwardRef<
14
- React.ElementRef<typeof ToastPrimitive.Root>,
14
+ React.ComponentRef<typeof ToastPrimitive.Root>,
15
15
  React.ComponentPropsWithoutRef<typeof ToastPrimitive.Root> & { variant?: 'default' | 'destructive' }
16
16
  >(({ className, variant = 'default', ...props }, ref) => {
17
17
  return (
@@ -33,7 +33,7 @@ const Toast = React.forwardRef<
33
33
  Toast.displayName = ToastPrimitive.Root?.displayName || 'Toast';
34
34
 
35
35
  const ToastTitle = React.forwardRef<
36
- React.ElementRef<typeof ToastPrimitive.Title>,
36
+ React.ComponentRef<typeof ToastPrimitive.Title>,
37
37
  React.ComponentPropsWithoutRef<typeof ToastPrimitive.Title>
38
38
  >(({ className, ...props }, ref) => (
39
39
  <ToastPrimitive.Title ref={ref} className={cn('text-foreground text-sm font-semibold', className)} {...props} />
@@ -41,7 +41,7 @@ const ToastTitle = React.forwardRef<
41
41
  ToastTitle.displayName = ToastPrimitive.Title?.displayName || 'ToastTitle';
42
42
 
43
43
  const ToastDescription = React.forwardRef<
44
- React.ElementRef<typeof ToastPrimitive.Description>,
44
+ React.ComponentRef<typeof ToastPrimitive.Description>,
45
45
  React.ComponentPropsWithoutRef<typeof ToastPrimitive.Description>
46
46
  >(({ className, ...props }, ref) => (
47
47
  <ToastPrimitive.Description
@@ -53,7 +53,7 @@ const ToastDescription = React.forwardRef<
53
53
  ToastDescription.displayName = ToastPrimitive.Description?.displayName || 'ToastDescription';
54
54
 
55
55
  const ToastClose = React.forwardRef<
56
- React.ElementRef<typeof ToastPrimitive.Close>,
56
+ React.ComponentRef<typeof ToastPrimitive.Close>,
57
57
  React.ComponentPropsWithoutRef<typeof ToastPrimitive.Close>
58
58
  >(({ className, ...props }, ref) => (
59
59
  <ToastPrimitive.Close
@@ -70,7 +70,7 @@ const ToastClose = React.forwardRef<
70
70
  ToastClose.displayName = ToastPrimitive.Close?.displayName || 'ToastClose';
71
71
 
72
72
  const ToastAction = React.forwardRef<
73
- React.ElementRef<typeof ToastPrimitive.Action>,
73
+ React.ComponentRef<typeof ToastPrimitive.Action>,
74
74
  React.ComponentPropsWithoutRef<typeof ToastPrimitive.Action>
75
75
  >(({ className, ...props }, ref) => (
76
76
  <ToastPrimitive.Action
@@ -17,7 +17,7 @@ export interface ToggleGroupProps
17
17
  Omit<React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>, 'value' | 'onValueChange' | 'type'>,
18
18
  ToggleGroupBaseProps {}
19
19
 
20
- const ToggleGroup = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Root>, ToggleGroupProps>(
20
+ const ToggleGroup = React.forwardRef<React.ComponentRef<typeof ToggleGroupPrimitive.Root>, ToggleGroupProps>(
21
21
  ({ className, variant, size, children, type, value, onValueChange, ...props }, ref) => (
22
22
  <ToggleGroupPrimitive.Root
23
23
  ref={ref}
@@ -41,7 +41,7 @@ export interface ToggleGroupItemProps
41
41
  Omit<React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>, 'children' | 'disabled'>,
42
42
  ToggleGroupItemBaseProps {}
43
43
 
44
- const ToggleGroupItem = React.forwardRef<React.ElementRef<typeof ToggleGroupPrimitive.Item>, ToggleGroupItemProps>(
44
+ const ToggleGroupItem = React.forwardRef<React.ComponentRef<typeof ToggleGroupPrimitive.Item>, ToggleGroupItemProps>(
45
45
  ({ className, children, variant, size, value, ...props }, ref) => {
46
46
  const context = React.useContext(ToggleGroupContext);
47
47
 
package/src/toggle.tsx CHANGED
@@ -10,7 +10,7 @@ export interface ToggleProps
10
10
  Omit<React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, 'pressed' | 'onPressedChange' | 'children'>,
11
11
  ToggleBaseProps {}
12
12
 
13
- const Toggle = React.forwardRef<React.ElementRef<typeof TogglePrimitive.Root>, ToggleProps>(
13
+ const Toggle = React.forwardRef<React.ComponentRef<typeof TogglePrimitive.Root>, ToggleProps>(
14
14
  ({ className, variant, size, ...props }, ref) => (
15
15
  <TextClassContext.Provider
16
16
  value={cn(