@react-native-reusables/cli 0.3.8 → 0.4.1

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 (42) hide show
  1. package/__generated/components/ui/accordion.tsx +53 -44
  2. package/__generated/components/ui/alert-dialog.tsx +96 -84
  3. package/__generated/components/ui/alert.tsx +33 -37
  4. package/__generated/components/ui/avatar.tsx +28 -22
  5. package/__generated/components/ui/badge.tsx +4 -3
  6. package/__generated/components/ui/button.tsx +18 -22
  7. package/__generated/components/ui/card.tsx +70 -43
  8. package/__generated/components/ui/checkbox.tsx +25 -24
  9. package/__generated/components/ui/context-menu.tsx +140 -121
  10. package/__generated/components/ui/dialog.tsx +74 -62
  11. package/__generated/components/ui/dropdown-menu.tsx +147 -126
  12. package/__generated/components/ui/hover-card.tsx +9 -7
  13. package/__generated/components/ui/input.tsx +19 -18
  14. package/__generated/components/ui/label.tsx +13 -6
  15. package/__generated/components/ui/menubar.tsx +164 -141
  16. package/__generated/components/ui/navigation-menu.tsx +68 -58
  17. package/__generated/components/ui/popover.tsx +11 -8
  18. package/__generated/components/ui/progress.tsx +10 -9
  19. package/__generated/components/ui/radio-group.tsx +29 -29
  20. package/__generated/components/ui/select.tsx +58 -40
  21. package/__generated/components/ui/separator.tsx +11 -6
  22. package/__generated/components/ui/switch.tsx +50 -47
  23. package/__generated/components/ui/table.tsx +66 -50
  24. package/__generated/components/ui/tabs.tsx +43 -36
  25. package/__generated/components/ui/text.tsx +17 -15
  26. package/__generated/components/ui/textarea.tsx +24 -21
  27. package/__generated/components/ui/toggle-group.tsx +32 -22
  28. package/__generated/components/ui/toggle.tsx +28 -23
  29. package/__generated/components/ui/tooltip.tsx +31 -26
  30. package/__generated/components/ui/typography.tsx +141 -198
  31. package/__generated/starter-base/app/_layout.tsx +24 -22
  32. package/__generated/starter-base/components/ThemeToggle.tsx +8 -16
  33. package/__generated/starter-base/components/ui/avatar.tsx +30 -28
  34. package/__generated/starter-base/components/ui/button.tsx +18 -25
  35. package/__generated/starter-base/components/ui/card.tsx +61 -36
  36. package/__generated/starter-base/components/ui/progress.tsx +11 -10
  37. package/__generated/starter-base/components/ui/text.tsx +17 -15
  38. package/__generated/starter-base/components/ui/tooltip.tsx +31 -26
  39. package/__generated/starter-base/package.json +10 -12
  40. package/dist/index.js +1 -1
  41. package/dist/index.js.map +1 -1
  42. package/package.json +3 -3
@@ -13,60 +13,66 @@ const DialogPortal = DialogPrimitive.Portal;
13
13
 
14
14
  const DialogClose = DialogPrimitive.Close;
15
15
 
16
- const DialogOverlayWeb = React.forwardRef<DialogPrimitive.OverlayRef, DialogPrimitive.OverlayProps>(
17
- ({ className, ...props }, ref) => {
18
- const { open } = DialogPrimitive.useRootContext();
19
- return (
20
- <DialogPrimitive.Overlay
21
- className={cn(
22
- 'bg-black/80 flex justify-center items-center p-2 absolute top-0 right-0 bottom-0 left-0',
23
- open ? 'web:animate-in web:fade-in-0' : 'web:animate-out web:fade-out-0',
24
- className
25
- )}
26
- {...props}
27
- ref={ref}
28
- />
29
- );
30
- }
31
- );
32
-
33
- DialogOverlayWeb.displayName = 'DialogOverlayWeb';
16
+ function DialogOverlayWeb({
17
+ className,
18
+ ...props
19
+ }: DialogPrimitive.OverlayProps & {
20
+ ref?: React.RefObject<DialogPrimitive.OverlayRef>;
21
+ }) {
22
+ const { open } = DialogPrimitive.useRootContext();
23
+ return (
24
+ <DialogPrimitive.Overlay
25
+ className={cn(
26
+ 'bg-black/80 flex justify-center items-center p-2 absolute top-0 right-0 bottom-0 left-0',
27
+ open ? 'web:animate-in web:fade-in-0' : 'web:animate-out web:fade-out-0',
28
+ className
29
+ )}
30
+ {...props}
31
+ />
32
+ );
33
+ }
34
34
 
35
- const DialogOverlayNative = React.forwardRef<
36
- DialogPrimitive.OverlayRef,
37
- DialogPrimitive.OverlayProps
38
- >(({ className, children, ...props }, ref) => {
35
+ function DialogOverlayNative({
36
+ className,
37
+ children,
38
+ ...props
39
+ }: DialogPrimitive.OverlayProps & {
40
+ ref?: React.RefObject<DialogPrimitive.OverlayRef>;
41
+ children?: React.ReactNode;
42
+ }) {
39
43
  return (
40
44
  <DialogPrimitive.Overlay
41
45
  style={StyleSheet.absoluteFill}
42
46
  className={cn('flex bg-black/80 justify-center items-center p-2', className)}
43
47
  {...props}
44
- ref={ref}
45
48
  >
46
49
  <Animated.View entering={FadeIn.duration(150)} exiting={FadeOut.duration(150)}>
47
- <>{children}</>
50
+ {children}
48
51
  </Animated.View>
49
52
  </DialogPrimitive.Overlay>
50
53
  );
51
- });
52
-
53
- DialogOverlayNative.displayName = 'DialogOverlayNative';
54
+ }
54
55
 
55
56
  const DialogOverlay = Platform.select({
56
57
  web: DialogOverlayWeb,
57
58
  default: DialogOverlayNative,
58
59
  });
59
60
 
60
- const DialogContent = React.forwardRef<
61
- DialogPrimitive.ContentRef,
62
- DialogPrimitive.ContentProps & { portalHost?: string }
63
- >(({ className, children, portalHost, ...props }, ref) => {
61
+ function DialogContent({
62
+ className,
63
+ children,
64
+ portalHost,
65
+ ...props
66
+ }: DialogPrimitive.ContentProps & {
67
+ ref?: React.RefObject<DialogPrimitive.ContentRef>;
68
+ className?: string;
69
+ portalHost?: string;
70
+ }) {
64
71
  const { open } = DialogPrimitive.useRootContext();
65
72
  return (
66
73
  <DialogPortal hostName={portalHost}>
67
74
  <DialogOverlay>
68
75
  <DialogPrimitive.Content
69
- ref={ref}
70
76
  className={cn(
71
77
  'max-w-lg gap-4 border border-border web:cursor-default bg-background p-6 shadow-lg web:duration-200 rounded-lg',
72
78
  open
@@ -91,47 +97,53 @@ const DialogContent = React.forwardRef<
91
97
  </DialogOverlay>
92
98
  </DialogPortal>
93
99
  );
94
- });
95
- DialogContent.displayName = DialogPrimitive.Content.displayName;
100
+ }
96
101
 
97
- const DialogHeader = ({ className, ...props }: ViewProps) => (
98
- <View className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props} />
99
- );
100
- DialogHeader.displayName = 'DialogHeader';
102
+ function DialogHeader({ className, ...props }: ViewProps) {
103
+ return (
104
+ <View className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props} />
105
+ );
106
+ }
101
107
 
102
- const DialogFooter = ({ className, ...props }: ViewProps) => (
103
- <View
104
- className={cn('flex flex-col-reverse sm:flex-row sm:justify-end gap-2', className)}
105
- {...props}
106
- />
107
- );
108
- DialogFooter.displayName = 'DialogFooter';
108
+ function DialogFooter({ className, ...props }: ViewProps) {
109
+ return (
110
+ <View
111
+ className={cn('flex flex-col-reverse sm:flex-row sm:justify-end gap-2', className)}
112
+ {...props}
113
+ />
114
+ );
115
+ }
109
116
 
110
- const DialogTitle = React.forwardRef<DialogPrimitive.TitleRef, DialogPrimitive.TitleProps>(
111
- ({ className, ...props }, ref) => (
117
+ function DialogTitle({
118
+ className,
119
+ ...props
120
+ }: DialogPrimitive.TitleProps & {
121
+ ref?: React.RefObject<DialogPrimitive.TitleRef>;
122
+ }) {
123
+ return (
112
124
  <DialogPrimitive.Title
113
- ref={ref}
114
125
  className={cn(
115
126
  'text-lg native:text-xl text-foreground font-semibold leading-none tracking-tight',
116
127
  className
117
128
  )}
118
129
  {...props}
119
130
  />
120
- )
121
- );
122
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
131
+ );
132
+ }
123
133
 
124
- const DialogDescription = React.forwardRef<
125
- DialogPrimitive.DescriptionRef,
126
- DialogPrimitive.DescriptionProps
127
- >(({ className, ...props }, ref) => (
128
- <DialogPrimitive.Description
129
- ref={ref}
130
- className={cn('text-sm native:text-base text-muted-foreground', className)}
131
- {...props}
132
- />
133
- ));
134
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
134
+ function DialogDescription({
135
+ className,
136
+ ...props
137
+ }: DialogPrimitive.DescriptionProps & {
138
+ ref?: React.RefObject<DialogPrimitive.DescriptionRef>;
139
+ }) {
140
+ return (
141
+ <DialogPrimitive.Description
142
+ className={cn('text-sm native:text-base text-muted-foreground', className)}
143
+ {...props}
144
+ />
145
+ );
146
+ }
135
147
 
136
148
  export {
137
149
  Dialog,
@@ -28,12 +28,17 @@ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
28
28
 
29
29
  const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
30
30
 
31
- const DropdownMenuSubTrigger = React.forwardRef<
32
- DropdownMenuPrimitive.SubTriggerRef,
33
- DropdownMenuPrimitive.SubTriggerProps & {
34
- inset?: boolean;
35
- }
36
- >(({ className, inset, children, ...props }, ref) => {
31
+ function DropdownMenuSubTrigger({
32
+ className,
33
+ inset,
34
+ children,
35
+ ...props
36
+ }: DropdownMenuPrimitive.SubTriggerProps & {
37
+ ref?: React.RefObject<DropdownMenuPrimitive.SubTriggerRef>;
38
+ className?: string;
39
+ inset?: boolean;
40
+ children?: React.ReactNode;
41
+ }) {
37
42
  const { open } = DropdownMenuPrimitive.useSubContext();
38
43
  const Icon = Platform.OS === 'web' ? ChevronRight : open ? ChevronUp : ChevronDown;
39
44
  return (
@@ -44,7 +49,6 @@ const DropdownMenuSubTrigger = React.forwardRef<
44
49
  )}
45
50
  >
46
51
  <DropdownMenuPrimitive.SubTrigger
47
- ref={ref}
48
52
  className={cn(
49
53
  'flex flex-row web:cursor-default web:select-none gap-2 items-center web:focus:bg-accent web:hover:bg-accent active:bg-accent rounded-sm px-2 py-1.5 native:py-2 web:outline-none',
50
54
  open && 'bg-accent',
@@ -53,22 +57,22 @@ const DropdownMenuSubTrigger = React.forwardRef<
53
57
  )}
54
58
  {...props}
55
59
  >
56
- <>{children}</>
60
+ {children}
57
61
  <Icon size={18} className='ml-auto text-foreground' />
58
62
  </DropdownMenuPrimitive.SubTrigger>
59
63
  </TextClassContext.Provider>
60
64
  );
61
- });
62
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
65
+ }
63
66
 
64
- const DropdownMenuSubContent = React.forwardRef<
65
- DropdownMenuPrimitive.SubContentRef,
66
- DropdownMenuPrimitive.SubContentProps
67
- >(({ className, ...props }, ref) => {
67
+ function DropdownMenuSubContent({
68
+ className,
69
+ ...props
70
+ }: DropdownMenuPrimitive.SubContentProps & {
71
+ ref?: React.RefObject<DropdownMenuPrimitive.SubContentRef>;
72
+ }) {
68
73
  const { open } = DropdownMenuPrimitive.useSubContext();
69
74
  return (
70
75
  <DropdownMenuPrimitive.SubContent
71
- ref={ref}
72
76
  className={cn(
73
77
  'z-50 min-w-[8rem] overflow-hidden rounded-md border border-border mt-1 bg-popover p-1 shadow-md shadow-foreground/5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
74
78
  open
@@ -79,17 +83,20 @@ const DropdownMenuSubContent = React.forwardRef<
79
83
  {...props}
80
84
  />
81
85
  );
82
- });
83
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
84
-
85
- const DropdownMenuContent = React.forwardRef<
86
- DropdownMenuPrimitive.ContentRef,
87
- DropdownMenuPrimitive.ContentProps & {
88
- overlayStyle?: StyleProp<ViewStyle>;
89
- overlayClassName?: string;
90
- portalHost?: string;
91
- }
92
- >(({ className, overlayClassName, overlayStyle, portalHost, ...props }, ref) => {
86
+ }
87
+
88
+ function DropdownMenuContent({
89
+ className,
90
+ overlayClassName,
91
+ overlayStyle,
92
+ portalHost,
93
+ ...props
94
+ }: DropdownMenuPrimitive.ContentProps & {
95
+ ref?: React.RefObject<DropdownMenuPrimitive.ContentRef>;
96
+ overlayStyle?: StyleProp<ViewStyle>;
97
+ overlayClassName?: string;
98
+ portalHost?: string;
99
+ }) {
93
100
  const { open } = DropdownMenuPrimitive.useRootContext();
94
101
  return (
95
102
  <DropdownMenuPrimitive.Portal hostName={portalHost}>
@@ -98,7 +105,7 @@ const DropdownMenuContent = React.forwardRef<
98
105
  overlayStyle
99
106
  ? StyleSheet.flatten([
100
107
  Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined,
101
- overlayStyle,
108
+ overlayStyle as typeof StyleSheet.absoluteFill,
102
109
  ])
103
110
  : Platform.OS !== 'web'
104
111
  ? StyleSheet.absoluteFill
@@ -107,7 +114,6 @@ const DropdownMenuContent = React.forwardRef<
107
114
  className={overlayClassName}
108
115
  >
109
116
  <DropdownMenuPrimitive.Content
110
- ref={ref}
111
117
  className={cn(
112
118
  'z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 shadow-md shadow-foreground/5 web:data-[side=bottom]:slide-in-from-top-2 web:data-[side=left]:slide-in-from-right-2 web:data-[side=right]:slide-in-from-left-2 web:data-[side=top]:slide-in-from-bottom-2',
113
119
  open
@@ -120,108 +126,124 @@ const DropdownMenuContent = React.forwardRef<
120
126
  </DropdownMenuPrimitive.Overlay>
121
127
  </DropdownMenuPrimitive.Portal>
122
128
  );
123
- });
124
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
125
-
126
- const DropdownMenuItem = React.forwardRef<
127
- DropdownMenuPrimitive.ItemRef,
128
- DropdownMenuPrimitive.ItemProps & {
129
- inset?: boolean;
130
- }
131
- >(({ className, inset, ...props }, ref) => (
132
- <TextClassContext.Provider value='select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground'>
133
- <DropdownMenuPrimitive.Item
134
- ref={ref}
129
+ }
130
+
131
+ function DropdownMenuItem({
132
+ className,
133
+ inset,
134
+ ...props
135
+ }: DropdownMenuPrimitive.ItemProps & {
136
+ ref?: React.RefObject<DropdownMenuPrimitive.ItemRef>;
137
+ className?: string;
138
+ inset?: boolean;
139
+ }) {
140
+ return (
141
+ <TextClassContext.Provider value='select-none text-sm native:text-lg text-popover-foreground web:group-focus:text-accent-foreground'>
142
+ <DropdownMenuPrimitive.Item
143
+ className={cn(
144
+ 'relative flex flex-row web:cursor-default gap-2 items-center rounded-sm px-2 py-1.5 native:py-2 web:outline-none web:focus:bg-accent active:bg-accent web:hover:bg-accent group',
145
+ inset && 'pl-8',
146
+ props.disabled && 'opacity-50 web:pointer-events-none',
147
+ className
148
+ )}
149
+ {...props}
150
+ />
151
+ </TextClassContext.Provider>
152
+ );
153
+ }
154
+
155
+ function DropdownMenuCheckboxItem({
156
+ className,
157
+ children,
158
+ checked,
159
+ ...props
160
+ }: DropdownMenuPrimitive.CheckboxItemProps & {
161
+ ref?: React.RefObject<DropdownMenuPrimitive.CheckboxItemRef>;
162
+ children?: React.ReactNode;
163
+ }) {
164
+ return (
165
+ <DropdownMenuPrimitive.CheckboxItem
166
+ className={cn(
167
+ 'relative flex flex-row web:cursor-default items-center web:group rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
168
+ props.disabled && 'web:pointer-events-none opacity-50',
169
+ className
170
+ )}
171
+ checked={checked}
172
+ {...props}
173
+ >
174
+ <View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
175
+ <DropdownMenuPrimitive.ItemIndicator>
176
+ <Check size={14} strokeWidth={3} className='text-foreground' />
177
+ </DropdownMenuPrimitive.ItemIndicator>
178
+ </View>
179
+ {children}
180
+ </DropdownMenuPrimitive.CheckboxItem>
181
+ );
182
+ }
183
+
184
+ function DropdownMenuRadioItem({
185
+ className,
186
+ children,
187
+ ...props
188
+ }: DropdownMenuPrimitive.RadioItemProps & {
189
+ ref?: React.RefObject<DropdownMenuPrimitive.RadioItemRef>;
190
+ children?: React.ReactNode;
191
+ }) {
192
+ return (
193
+ <DropdownMenuPrimitive.RadioItem
194
+ className={cn(
195
+ 'relative flex flex-row web:cursor-default web:group items-center rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
196
+ props.disabled && 'web:pointer-events-none opacity-50',
197
+ className
198
+ )}
199
+ {...props}
200
+ >
201
+ <View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
202
+ <DropdownMenuPrimitive.ItemIndicator>
203
+ <View className='bg-foreground h-2 w-2 rounded-full' />
204
+ </DropdownMenuPrimitive.ItemIndicator>
205
+ </View>
206
+ {children}
207
+ </DropdownMenuPrimitive.RadioItem>
208
+ );
209
+ }
210
+
211
+ function DropdownMenuLabel({
212
+ className,
213
+ inset,
214
+ ...props
215
+ }: DropdownMenuPrimitive.LabelProps & {
216
+ ref?: React.RefObject<DropdownMenuPrimitive.LabelRef>;
217
+ className?: string;
218
+ inset?: boolean;
219
+ }) {
220
+ return (
221
+ <DropdownMenuPrimitive.Label
135
222
  className={cn(
136
- 'relative flex flex-row web:cursor-default gap-2 items-center rounded-sm px-2 py-1.5 native:py-2 web:outline-none web:focus:bg-accent active:bg-accent web:hover:bg-accent group',
223
+ 'px-2 py-1.5 text-sm native:text-base font-semibold text-foreground web:cursor-default',
137
224
  inset && 'pl-8',
138
- props.disabled && 'opacity-50 web:pointer-events-none',
139
225
  className
140
226
  )}
141
227
  {...props}
142
228
  />
143
- </TextClassContext.Provider>
144
- ));
145
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
146
-
147
- const DropdownMenuCheckboxItem = React.forwardRef<
148
- DropdownMenuPrimitive.CheckboxItemRef,
149
- DropdownMenuPrimitive.CheckboxItemProps
150
- >(({ className, children, checked, ...props }, ref) => (
151
- <DropdownMenuPrimitive.CheckboxItem
152
- ref={ref}
153
- className={cn(
154
- 'relative flex flex-row web:cursor-default items-center web:group rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
155
- props.disabled && 'web:pointer-events-none opacity-50',
156
- className
157
- )}
158
- checked={checked}
159
- {...props}
160
- >
161
- <View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
162
- <DropdownMenuPrimitive.ItemIndicator>
163
- <Check size={14} strokeWidth={3} className='text-foreground' />
164
- </DropdownMenuPrimitive.ItemIndicator>
165
- </View>
166
- <>{children}</>
167
- </DropdownMenuPrimitive.CheckboxItem>
168
- ));
169
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
170
-
171
- const DropdownMenuRadioItem = React.forwardRef<
172
- DropdownMenuPrimitive.RadioItemRef,
173
- DropdownMenuPrimitive.RadioItemProps
174
- >(({ className, children, ...props }, ref) => (
175
- <DropdownMenuPrimitive.RadioItem
176
- ref={ref}
177
- className={cn(
178
- 'relative flex flex-row web:cursor-default web:group items-center rounded-sm py-1.5 native:py-2 pl-8 pr-2 web:outline-none web:focus:bg-accent active:bg-accent',
179
- props.disabled && 'web:pointer-events-none opacity-50',
180
- className
181
- )}
182
- {...props}
183
- >
184
- <View className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
185
- <DropdownMenuPrimitive.ItemIndicator>
186
- <View className='bg-foreground h-2 w-2 rounded-full' />
187
- </DropdownMenuPrimitive.ItemIndicator>
188
- </View>
189
- <>{children}</>
190
- </DropdownMenuPrimitive.RadioItem>
191
- ));
192
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
193
-
194
- const DropdownMenuLabel = React.forwardRef<
195
- DropdownMenuPrimitive.LabelRef,
196
- DropdownMenuPrimitive.LabelProps & {
197
- inset?: boolean;
198
- }
199
- >(({ className, inset, ...props }, ref) => (
200
- <DropdownMenuPrimitive.Label
201
- ref={ref}
202
- className={cn(
203
- 'px-2 py-1.5 text-sm native:text-base font-semibold text-foreground web:cursor-default',
204
- inset && 'pl-8',
205
- className
206
- )}
207
- {...props}
208
- />
209
- ));
210
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
211
-
212
- const DropdownMenuSeparator = React.forwardRef<
213
- DropdownMenuPrimitive.SeparatorRef,
214
- DropdownMenuPrimitive.SeparatorProps
215
- >(({ className, ...props }, ref) => (
216
- <DropdownMenuPrimitive.Separator
217
- ref={ref}
218
- className={cn('-mx-1 my-1 h-px bg-border', className)}
219
- {...props}
220
- />
221
- ));
222
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
223
-
224
- const DropdownMenuShortcut = ({ className, ...props }: TextProps) => {
229
+ );
230
+ }
231
+
232
+ function DropdownMenuSeparator({
233
+ className,
234
+ ...props
235
+ }: DropdownMenuPrimitive.SeparatorProps & {
236
+ ref?: React.RefObject<DropdownMenuPrimitive.SeparatorRef>;
237
+ }) {
238
+ return (
239
+ <DropdownMenuPrimitive.Separator
240
+ className={cn('-mx-1 my-1 h-px bg-border', className)}
241
+ {...props}
242
+ />
243
+ );
244
+ }
245
+
246
+ function DropdownMenuShortcut({ className, ...props }: TextProps) {
225
247
  return (
226
248
  <Text
227
249
  className={cn(
@@ -231,8 +253,7 @@ const DropdownMenuShortcut = ({ className, ...props }: TextProps) => {
231
253
  {...props}
232
254
  />
233
255
  );
234
- };
235
- DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
256
+ }
236
257
 
237
258
  export {
238
259
  DropdownMenu,
@@ -9,10 +9,14 @@ const HoverCard = HoverCardPrimitive.Root;
9
9
 
10
10
  const HoverCardTrigger = HoverCardPrimitive.Trigger;
11
11
 
12
- const HoverCardContent = React.forwardRef<
13
- HoverCardPrimitive.ContentRef,
14
- HoverCardPrimitive.ContentProps
15
- >(({ className, align = 'center', sideOffset = 4, ...props }, ref) => {
12
+ function HoverCardContent({
13
+ className,
14
+ align = 'center',
15
+ sideOffset = 4,
16
+ ...props
17
+ }: HoverCardPrimitive.ContentProps & {
18
+ ref?: React.RefObject<HoverCardPrimitive.ContentRef>;
19
+ }) {
16
20
  const { open } = HoverCardPrimitive.useRootContext();
17
21
  return (
18
22
  <HoverCardPrimitive.Portal>
@@ -22,7 +26,6 @@ const HoverCardContent = React.forwardRef<
22
26
  <Animated.View entering={FadeIn}>
23
27
  <TextClassContext.Provider value='text-popover-foreground'>
24
28
  <HoverCardPrimitive.Content
25
- ref={ref}
26
29
  align={align}
27
30
  sideOffset={sideOffset}
28
31
  className={cn(
@@ -39,7 +42,6 @@ const HoverCardContent = React.forwardRef<
39
42
  </HoverCardPrimitive.Overlay>
40
43
  </HoverCardPrimitive.Portal>
41
44
  );
42
- });
43
- HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
45
+ }
44
46
 
45
47
  export { HoverCard, HoverCardContent, HoverCardTrigger };
@@ -2,23 +2,24 @@ import * as React from 'react';
2
2
  import { TextInput, type TextInputProps } from 'react-native';
3
3
  import { cn } from '../../lib/utils';
4
4
 
5
- const Input = React.forwardRef<React.ElementRef<typeof TextInput>, TextInputProps>(
6
- ({ className, placeholderClassName, ...props }, ref) => {
7
- return (
8
- <TextInput
9
- ref={ref}
10
- className={cn(
11
- 'web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 text-base lg:text-sm native:text-lg native:leading-[1.25] text-foreground placeholder:text-muted-foreground web:ring-offset-background file:border-0 file:bg-transparent file:font-medium web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2',
12
- props.editable === false && 'opacity-50 web:cursor-not-allowed',
13
- className
14
- )}
15
- placeholderClassName={cn('text-muted-foreground', placeholderClassName)}
16
- {...props}
17
- />
18
- );
19
- }
20
- );
21
-
22
- Input.displayName = 'Input';
5
+ function Input({
6
+ className,
7
+ placeholderClassName,
8
+ ...props
9
+ }: TextInputProps & {
10
+ ref?: React.RefObject<TextInput>;
11
+ }) {
12
+ return (
13
+ <TextInput
14
+ className={cn(
15
+ 'web:flex h-10 native:h-12 web:w-full rounded-md border border-input bg-background px-3 web:py-2 text-base lg:text-sm native:text-lg native:leading-[1.25] text-foreground placeholder:text-muted-foreground web:ring-offset-background file:border-0 file:bg-transparent file:font-medium web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2',
16
+ props.editable === false && 'opacity-50 web:cursor-not-allowed',
17
+ className
18
+ )}
19
+ placeholderClassName={cn('text-muted-foreground', placeholderClassName)}
20
+ {...props}
21
+ />
22
+ );
23
+ }
23
24
 
24
25
  export { Input };
@@ -2,8 +2,17 @@ import * as LabelPrimitive from '@rn-primitives/label';
2
2
  import * as React from 'react';
3
3
  import { cn } from '../../lib/utils';
4
4
 
5
- const Label = React.forwardRef<LabelPrimitive.TextRef, LabelPrimitive.TextProps>(
6
- ({ className, onPress, onLongPress, onPressIn, onPressOut, ...props }, ref) => (
5
+ function Label({
6
+ className,
7
+ onPress,
8
+ onLongPress,
9
+ onPressIn,
10
+ onPressOut,
11
+ ...props
12
+ }: LabelPrimitive.TextProps & {
13
+ ref?: React.RefObject<LabelPrimitive.TextRef>;
14
+ }) {
15
+ return (
7
16
  <LabelPrimitive.Root
8
17
  className='web:cursor-default'
9
18
  onPress={onPress}
@@ -12,7 +21,6 @@ const Label = React.forwardRef<LabelPrimitive.TextRef, LabelPrimitive.TextProps>
12
21
  onPressOut={onPressOut}
13
22
  >
14
23
  <LabelPrimitive.Text
15
- ref={ref}
16
24
  className={cn(
17
25
  'text-sm text-foreground native:text-base font-medium leading-none web:peer-disabled:cursor-not-allowed web:peer-disabled:opacity-70',
18
26
  className
@@ -20,8 +28,7 @@ const Label = React.forwardRef<LabelPrimitive.TextRef, LabelPrimitive.TextProps>
20
28
  {...props}
21
29
  />
22
30
  </LabelPrimitive.Root>
23
- )
24
- );
25
- Label.displayName = LabelPrimitive.Root.displayName;
31
+ );
32
+ }
26
33
 
27
34
  export { Label };