@gv-tech/ui-native 2.23.3 → 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.
- package/dist/__contracts.d.ts +2 -0
- package/dist/__contracts.d.ts.map +1 -0
- package/dist/accordion.d.ts +4 -4
- package/dist/accordion.d.ts.map +1 -1
- package/dist/alert-dialog.d.ts +6 -6
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/avatar.d.ts +3 -3
- package/dist/avatar.d.ts.map +1 -1
- package/dist/button.d.ts +2 -2
- package/dist/button.d.ts.map +1 -1
- package/dist/dialog.d.ts +4 -4
- package/dist/dialog.d.ts.map +1 -1
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/form.d.ts +3 -1
- package/dist/form.d.ts.map +1 -1
- package/dist/sheet.d.ts +4 -4
- package/dist/sheet.d.ts.map +1 -1
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/ui-native.cjs +1 -1
- package/dist/ui-native.esm.js +5 -1
- package/package.json +1 -1
- package/src/__contracts.ts +880 -0
- package/src/accordion.tsx +10 -10
- package/src/alert-dialog.tsx +12 -12
- package/src/alert.tsx +3 -3
- package/src/avatar.tsx +6 -6
- package/src/button.tsx +5 -1
- package/src/card.tsx +6 -6
- package/src/carousel.tsx +2 -2
- package/src/checkbox.tsx +1 -1
- package/src/context-menu.tsx +9 -9
- package/src/dialog.tsx +4 -4
- package/src/drawer.tsx +12 -12
- package/src/dropdown-menu.tsx +11 -11
- package/src/form.tsx +6 -6
- package/src/hover-card.tsx +1 -1
- package/src/input.tsx +1 -1
- package/src/label.tsx +1 -1
- package/src/menubar.tsx +17 -17
- package/src/navigation-menu.tsx +8 -8
- package/src/popover.tsx +4 -4
- package/src/progress.tsx +1 -1
- package/src/radio-group.tsx +2 -2
- package/src/search.tsx +1 -1
- package/src/select.tsx +7 -7
- package/src/separator.tsx +1 -1
- package/src/sheet.tsx +4 -4
- package/src/switch.tsx +1 -1
- package/src/table.tsx +8 -8
- package/src/tabs.tsx +4 -4
- package/src/text.tsx +1 -1
- package/src/textarea.tsx +1 -1
- package/src/toast.tsx +5 -5
- package/src/toggle-group.tsx +2 -2
- package/src/toggle.tsx +1 -1
- package/src/tooltip.tsx +2 -2
package/src/accordion.tsx
CHANGED
|
@@ -13,9 +13,9 @@ import Animated, {
|
|
|
13
13
|
import { cn } from './lib/utils';
|
|
14
14
|
|
|
15
15
|
const Accordion: React.ForwardRefExoticComponent<
|
|
16
|
-
AccordionProps & React.RefAttributes<React.
|
|
16
|
+
AccordionProps & React.RefAttributes<React.ComponentRef<typeof AccordionPrimitive.Root>>
|
|
17
17
|
> = React.forwardRef<
|
|
18
|
-
React.
|
|
18
|
+
React.ComponentRef<typeof AccordionPrimitive.Root>,
|
|
19
19
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>
|
|
20
20
|
>(({ className, ...props }, ref) => {
|
|
21
21
|
return <AccordionPrimitive.Root ref={ref} className={cn('web:gap-0', className)} {...props} />;
|
|
@@ -23,9 +23,9 @@ const Accordion: React.ForwardRefExoticComponent<
|
|
|
23
23
|
Accordion.displayName = AccordionPrimitive.Root?.displayName || 'Accordion';
|
|
24
24
|
|
|
25
25
|
const AccordionItem: React.ForwardRefExoticComponent<
|
|
26
|
-
AccordionItemProps & React.RefAttributes<React.
|
|
26
|
+
AccordionItemProps & React.RefAttributes<React.ComponentRef<typeof AccordionPrimitive.Item>>
|
|
27
27
|
> = React.forwardRef<
|
|
28
|
-
React.
|
|
28
|
+
React.ComponentRef<typeof AccordionPrimitive.Item>,
|
|
29
29
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
30
30
|
>(({ className, ...props }, ref) => {
|
|
31
31
|
return (
|
|
@@ -35,9 +35,9 @@ const AccordionItem: React.ForwardRefExoticComponent<
|
|
|
35
35
|
AccordionItem.displayName = AccordionPrimitive.Item?.displayName || 'AccordionItem';
|
|
36
36
|
|
|
37
37
|
const AccordionHeader: React.ForwardRefExoticComponent<
|
|
38
|
-
AccordionHeaderProps & React.RefAttributes<React.
|
|
38
|
+
AccordionHeaderProps & React.RefAttributes<React.ComponentRef<typeof AccordionPrimitive.Header>>
|
|
39
39
|
> = React.forwardRef<
|
|
40
|
-
React.
|
|
40
|
+
React.ComponentRef<typeof AccordionPrimitive.Header>,
|
|
41
41
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Header>
|
|
42
42
|
>(({ className, ...props }, ref) => {
|
|
43
43
|
return <AccordionPrimitive.Header ref={ref} className={cn('flex flex-row', className)} {...props} />;
|
|
@@ -45,9 +45,9 @@ const AccordionHeader: React.ForwardRefExoticComponent<
|
|
|
45
45
|
AccordionHeader.displayName = AccordionPrimitive.Header?.displayName || 'AccordionHeader';
|
|
46
46
|
|
|
47
47
|
const AccordionTrigger: React.ForwardRefExoticComponent<
|
|
48
|
-
AccordionTriggerProps & React.RefAttributes<React.
|
|
48
|
+
AccordionTriggerProps & React.RefAttributes<React.ComponentRef<typeof AccordionPrimitive.Trigger>>
|
|
49
49
|
> = React.forwardRef<
|
|
50
|
-
React.
|
|
50
|
+
React.ComponentRef<typeof AccordionPrimitive.Trigger>,
|
|
51
51
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
52
52
|
>(({ className, children, ...props }, ref) => {
|
|
53
53
|
const { isExpanded } = AccordionPrimitive.useItemContext();
|
|
@@ -80,9 +80,9 @@ const AccordionTrigger: React.ForwardRefExoticComponent<
|
|
|
80
80
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger?.displayName || 'AccordionTrigger';
|
|
81
81
|
|
|
82
82
|
const AccordionContent: React.ForwardRefExoticComponent<
|
|
83
|
-
AccordionContentProps & React.RefAttributes<React.
|
|
83
|
+
AccordionContentProps & React.RefAttributes<React.ComponentRef<typeof AccordionPrimitive.Content>>
|
|
84
84
|
> = React.forwardRef<
|
|
85
|
-
React.
|
|
85
|
+
React.ComponentRef<typeof AccordionPrimitive.Content>,
|
|
86
86
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
87
87
|
>(({ className, children, ...props }, ref) => {
|
|
88
88
|
return (
|
package/src/alert-dialog.tsx
CHANGED
|
@@ -13,9 +13,9 @@ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
|
13
13
|
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
14
14
|
|
|
15
15
|
const AlertDialogOverlay: React.ForwardRefExoticComponent<
|
|
16
|
-
AlertDialogOverlayProps & React.RefAttributes<React.
|
|
16
|
+
AlertDialogOverlayProps & React.RefAttributes<React.ComponentRef<typeof AlertDialogPrimitive.Overlay>>
|
|
17
17
|
> = React.forwardRef<
|
|
18
|
-
React.
|
|
18
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Overlay>,
|
|
19
19
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
20
20
|
>(({ className, ...props }, ref) => {
|
|
21
21
|
return (
|
|
@@ -31,9 +31,9 @@ const AlertDialogOverlay: React.ForwardRefExoticComponent<
|
|
|
31
31
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay?.displayName || 'AlertDialogOverlay';
|
|
32
32
|
|
|
33
33
|
const AlertDialogContent: React.ForwardRefExoticComponent<
|
|
34
|
-
AlertDialogContentProps & React.RefAttributes<React.
|
|
34
|
+
AlertDialogContentProps & React.RefAttributes<React.ComponentRef<typeof AlertDialogPrimitive.Content>>
|
|
35
35
|
> = React.forwardRef<
|
|
36
|
-
React.
|
|
36
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Content>,
|
|
37
37
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {
|
|
38
38
|
portalHost?: string;
|
|
39
39
|
overlayClassName?: string;
|
|
@@ -69,9 +69,9 @@ const AlertDialogFooter = ({ className, ...props }: React.ComponentPropsWithoutR
|
|
|
69
69
|
AlertDialogFooter.displayName = 'AlertDialogFooter';
|
|
70
70
|
|
|
71
71
|
const AlertDialogTitle: React.ForwardRefExoticComponent<
|
|
72
|
-
AlertDialogTitleProps & React.RefAttributes<React.
|
|
72
|
+
AlertDialogTitleProps & React.RefAttributes<React.ComponentRef<typeof AlertDialogPrimitive.Title>>
|
|
73
73
|
> = React.forwardRef<
|
|
74
|
-
React.
|
|
74
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Title>,
|
|
75
75
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
76
76
|
>(({ className, ...props }, ref) => (
|
|
77
77
|
<AlertDialogPrimitive.Title
|
|
@@ -83,9 +83,9 @@ const AlertDialogTitle: React.ForwardRefExoticComponent<
|
|
|
83
83
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title?.displayName || 'AlertDialogTitle';
|
|
84
84
|
|
|
85
85
|
const AlertDialogDescription: React.ForwardRefExoticComponent<
|
|
86
|
-
AlertDialogDescriptionProps & React.RefAttributes<React.
|
|
86
|
+
AlertDialogDescriptionProps & React.RefAttributes<React.ComponentRef<typeof AlertDialogPrimitive.Description>>
|
|
87
87
|
> = React.forwardRef<
|
|
88
|
-
React.
|
|
88
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Description>,
|
|
89
89
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
90
90
|
>(({ className, ...props }, ref) => (
|
|
91
91
|
<AlertDialogPrimitive.Description
|
|
@@ -97,9 +97,9 @@ const AlertDialogDescription: React.ForwardRefExoticComponent<
|
|
|
97
97
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description?.displayName || 'AlertDialogDescription';
|
|
98
98
|
|
|
99
99
|
const AlertDialogAction: React.ForwardRefExoticComponent<
|
|
100
|
-
AlertDialogActionProps & React.RefAttributes<React.
|
|
100
|
+
AlertDialogActionProps & React.RefAttributes<React.ComponentRef<typeof AlertDialogPrimitive.Action>>
|
|
101
101
|
> = React.forwardRef<
|
|
102
|
-
React.
|
|
102
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Action>,
|
|
103
103
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
104
104
|
>(({ className, ...props }, ref) => (
|
|
105
105
|
<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
|
|
@@ -107,9 +107,9 @@ const AlertDialogAction: React.ForwardRefExoticComponent<
|
|
|
107
107
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action?.displayName || 'AlertDialogAction';
|
|
108
108
|
|
|
109
109
|
const AlertDialogCancel: React.ForwardRefExoticComponent<
|
|
110
|
-
AlertDialogCancelProps & React.RefAttributes<React.
|
|
110
|
+
AlertDialogCancelProps & React.RefAttributes<React.ComponentRef<typeof AlertDialogPrimitive.Cancel>>
|
|
111
111
|
> = React.forwardRef<
|
|
112
|
-
React.
|
|
112
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Cancel>,
|
|
113
113
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
114
114
|
>(({ className, ...props }, ref) => (
|
|
115
115
|
<AlertDialogPrimitive.Cancel
|
package/src/alert.tsx
CHANGED
|
@@ -20,7 +20,7 @@ const alertVariants = cva('relative w-full rounded-lg border p-4', {
|
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
const Alert = React.forwardRef<
|
|
23
|
-
React.
|
|
23
|
+
React.ComponentRef<typeof View>,
|
|
24
24
|
React.ComponentPropsWithoutRef<typeof View> & VariantProps<typeof alertVariants>
|
|
25
25
|
>(({ className, variant, children, ...props }, ref) => (
|
|
26
26
|
<View ref={ref} className={cn(alertVariants({ variant }), className)} {...props}>
|
|
@@ -29,7 +29,7 @@ const Alert = React.forwardRef<
|
|
|
29
29
|
));
|
|
30
30
|
Alert.displayName = 'Alert';
|
|
31
31
|
|
|
32
|
-
const AlertTitle = React.forwardRef<React.
|
|
32
|
+
const AlertTitle = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
33
33
|
({ className, ...props }, ref) => (
|
|
34
34
|
<Text
|
|
35
35
|
ref={ref}
|
|
@@ -40,7 +40,7 @@ const AlertTitle = React.forwardRef<React.ElementRef<typeof Text>, React.Compone
|
|
|
40
40
|
);
|
|
41
41
|
AlertTitle.displayName = 'AlertTitle';
|
|
42
42
|
|
|
43
|
-
const AlertDescription = React.forwardRef<React.
|
|
43
|
+
const AlertDescription = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
44
44
|
({ className, ...props }, ref) => (
|
|
45
45
|
<Text ref={ref} className={cn('text-muted-foreground text-sm leading-relaxed', className)} {...props} />
|
|
46
46
|
),
|
package/src/avatar.tsx
CHANGED
|
@@ -4,9 +4,9 @@ import * as React from 'react';
|
|
|
4
4
|
import { cn } from './lib/utils';
|
|
5
5
|
|
|
6
6
|
const Avatar: React.ForwardRefExoticComponent<
|
|
7
|
-
AvatarProps & React.RefAttributes<React.
|
|
7
|
+
AvatarProps & React.RefAttributes<React.ComponentRef<typeof AvatarPrimitive.Root>>
|
|
8
8
|
> = React.forwardRef<
|
|
9
|
-
React.
|
|
9
|
+
React.ComponentRef<typeof AvatarPrimitive.Root>,
|
|
10
10
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
11
11
|
>(({ className, ...props }, ref) => (
|
|
12
12
|
<AvatarPrimitive.Root
|
|
@@ -18,9 +18,9 @@ const Avatar: React.ForwardRefExoticComponent<
|
|
|
18
18
|
Avatar.displayName = AvatarPrimitive.Root?.displayName || 'Avatar';
|
|
19
19
|
|
|
20
20
|
const AvatarImage: React.ForwardRefExoticComponent<
|
|
21
|
-
AvatarImageProps & React.RefAttributes<React.
|
|
21
|
+
AvatarImageProps & React.RefAttributes<React.ComponentRef<typeof AvatarPrimitive.Image>>
|
|
22
22
|
> = React.forwardRef<
|
|
23
|
-
React.
|
|
23
|
+
React.ComponentRef<typeof AvatarPrimitive.Image>,
|
|
24
24
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
25
25
|
>(({ className, ...props }, ref) => (
|
|
26
26
|
<AvatarPrimitive.Image ref={ref} className={cn('aspect-square h-full w-full', className)} {...props} />
|
|
@@ -28,9 +28,9 @@ const AvatarImage: React.ForwardRefExoticComponent<
|
|
|
28
28
|
AvatarImage.displayName = AvatarPrimitive.Image?.displayName || 'AvatarImage';
|
|
29
29
|
|
|
30
30
|
const AvatarFallback: React.ForwardRefExoticComponent<
|
|
31
|
-
AvatarFallbackProps & React.RefAttributes<React.
|
|
31
|
+
AvatarFallbackProps & React.RefAttributes<React.ComponentRef<typeof AvatarPrimitive.Fallback>>
|
|
32
32
|
> = React.forwardRef<
|
|
33
|
-
React.
|
|
33
|
+
React.ComponentRef<typeof AvatarPrimitive.Fallback>,
|
|
34
34
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
35
35
|
>(({ className, ...props }, ref) => (
|
|
36
36
|
<AvatarPrimitive.Fallback
|
package/src/button.tsx
CHANGED
|
@@ -20,9 +20,13 @@ const buttonVariants = cva(
|
|
|
20
20
|
},
|
|
21
21
|
size: {
|
|
22
22
|
default: 'h-10 px-4 py-2',
|
|
23
|
+
xs: 'h-7 px-2',
|
|
23
24
|
sm: 'h-9 px-3',
|
|
24
25
|
lg: 'h-12 px-8',
|
|
25
26
|
icon: 'h-10 w-10',
|
|
27
|
+
'icon-xs': 'h-7 w-7',
|
|
28
|
+
'icon-sm': 'h-9 w-9',
|
|
29
|
+
'icon-lg': 'h-12 w-12',
|
|
26
30
|
},
|
|
27
31
|
},
|
|
28
32
|
defaultVariants: {
|
|
@@ -50,7 +54,7 @@ const buttonTextVariants = cva('text-sm font-medium', {
|
|
|
50
54
|
|
|
51
55
|
export interface ButtonProps extends ButtonBaseProps {
|
|
52
56
|
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' | null;
|
|
53
|
-
size?: 'default' | 'sm' | 'lg' | 'icon' | null;
|
|
57
|
+
size?: 'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg' | null;
|
|
54
58
|
onPress?: () => void;
|
|
55
59
|
}
|
|
56
60
|
|
package/src/card.tsx
CHANGED
|
@@ -7,19 +7,19 @@ import { cn } from './lib/utils';
|
|
|
7
7
|
|
|
8
8
|
export interface CardProps extends React.ComponentPropsWithoutRef<typeof View>, CardBaseProps {}
|
|
9
9
|
|
|
10
|
-
const Card = React.forwardRef<React.
|
|
10
|
+
const Card = React.forwardRef<React.ComponentRef<typeof View>, CardProps>(({ className, ...props }, ref) => (
|
|
11
11
|
<View ref={ref} className={cn('border-border bg-card rounded-xl border shadow-sm', className)} {...props} />
|
|
12
12
|
));
|
|
13
13
|
Card.displayName = 'Card';
|
|
14
14
|
|
|
15
|
-
const CardHeader = React.forwardRef<React.
|
|
15
|
+
const CardHeader = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
16
16
|
({ className, ...props }, ref) => (
|
|
17
17
|
<View ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />
|
|
18
18
|
),
|
|
19
19
|
);
|
|
20
20
|
CardHeader.displayName = 'CardHeader';
|
|
21
21
|
|
|
22
|
-
const CardTitle = React.forwardRef<React.
|
|
22
|
+
const CardTitle = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
23
23
|
({ className, ...props }, ref) => (
|
|
24
24
|
<Text
|
|
25
25
|
ref={ref}
|
|
@@ -30,14 +30,14 @@ const CardTitle = React.forwardRef<React.ElementRef<typeof Text>, React.Componen
|
|
|
30
30
|
);
|
|
31
31
|
CardTitle.displayName = 'CardTitle';
|
|
32
32
|
|
|
33
|
-
const CardDescription = React.forwardRef<React.
|
|
33
|
+
const CardDescription = React.forwardRef<React.ComponentRef<typeof Text>, React.ComponentPropsWithoutRef<typeof Text>>(
|
|
34
34
|
({ className, ...props }, ref) => (
|
|
35
35
|
<Text ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
36
36
|
),
|
|
37
37
|
);
|
|
38
38
|
CardDescription.displayName = 'CardDescription';
|
|
39
39
|
|
|
40
|
-
const CardContent = React.forwardRef<React.
|
|
40
|
+
const CardContent = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
41
41
|
({ className, ...props }, ref) => (
|
|
42
42
|
<View ref={ref} className={cn('p-6 pt-0', className)} {...props}>
|
|
43
43
|
{wrapTextChildren(props.children, Text, { className: 'text-sm text-card-foreground' })}
|
|
@@ -46,7 +46,7 @@ const CardContent = React.forwardRef<React.ElementRef<typeof View>, React.Compon
|
|
|
46
46
|
);
|
|
47
47
|
CardContent.displayName = 'CardContent';
|
|
48
48
|
|
|
49
|
-
const CardFooter = React.forwardRef<React.
|
|
49
|
+
const CardFooter = React.forwardRef<React.ComponentRef<typeof View>, React.ComponentPropsWithoutRef<typeof View>>(
|
|
50
50
|
({ className, ...props }, ref) => (
|
|
51
51
|
<View ref={ref} className={cn('flex flex-row items-center p-6 pt-0', className)} {...props} />
|
|
52
52
|
),
|
package/src/carousel.tsx
CHANGED
|
@@ -151,7 +151,7 @@ export const CarouselItem = React.forwardRef<View, CarouselItemBaseProps>(({ chi
|
|
|
151
151
|
});
|
|
152
152
|
CarouselItem.displayName = 'CarouselItem';
|
|
153
153
|
|
|
154
|
-
export const CarouselPrevious = React.forwardRef<React.
|
|
154
|
+
export const CarouselPrevious = React.forwardRef<React.ComponentRef<typeof Button>, CarouselPreviousBaseProps>(
|
|
155
155
|
({ className, variant = 'outline', size = 'icon', ...props }, ref) => {
|
|
156
156
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
157
157
|
|
|
@@ -178,7 +178,7 @@ export const CarouselPrevious = React.forwardRef<React.ElementRef<typeof Button>
|
|
|
178
178
|
);
|
|
179
179
|
CarouselPrevious.displayName = 'CarouselPrevious';
|
|
180
180
|
|
|
181
|
-
export const CarouselNext = React.forwardRef<React.
|
|
181
|
+
export const CarouselNext = React.forwardRef<React.ComponentRef<typeof Button>, CarouselNextBaseProps>(
|
|
182
182
|
({ className, variant = 'outline', size = 'icon', ...props }, ref) => {
|
|
183
183
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
184
184
|
|
package/src/checkbox.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { Platform } from 'react-native';
|
|
|
6
6
|
import { cn } from './lib/utils';
|
|
7
7
|
|
|
8
8
|
const Checkbox = React.forwardRef<
|
|
9
|
-
React.
|
|
9
|
+
React.ComponentRef<typeof CheckboxPrimitive.Root>,
|
|
10
10
|
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
11
11
|
>(({ className, ...props }, ref) => {
|
|
12
12
|
return (
|
package/src/context-menu.tsx
CHANGED
|
@@ -31,7 +31,7 @@ export const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
|
31
31
|
export const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
32
32
|
|
|
33
33
|
const ContextMenuOverlay = React.forwardRef<
|
|
34
|
-
React.
|
|
34
|
+
React.ComponentRef<typeof ContextMenuPrimitive.Overlay>,
|
|
35
35
|
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Overlay>
|
|
36
36
|
>(({ className, ...props }, ref) => {
|
|
37
37
|
return (
|
|
@@ -51,7 +51,7 @@ const ContextMenuOverlay = React.forwardRef<
|
|
|
51
51
|
ContextMenuOverlay.displayName = 'ContextMenuOverlay';
|
|
52
52
|
|
|
53
53
|
export const ContextMenuContent = React.forwardRef<
|
|
54
|
-
React.
|
|
54
|
+
React.ComponentRef<typeof ContextMenuPrimitive.Content>,
|
|
55
55
|
ContextMenuContentBaseProps
|
|
56
56
|
>(({ className, children, ...props }, ref) => {
|
|
57
57
|
return (
|
|
@@ -73,7 +73,7 @@ export const ContextMenuContent = React.forwardRef<
|
|
|
73
73
|
ContextMenuContent.displayName = 'ContextMenuContent';
|
|
74
74
|
|
|
75
75
|
export const ContextMenuItem = React.forwardRef<
|
|
76
|
-
React.
|
|
76
|
+
React.ComponentRef<typeof ContextMenuPrimitive.Item>,
|
|
77
77
|
ContextMenuItemBaseProps
|
|
78
78
|
>(({ className, children, inset, ...props }, ref) => {
|
|
79
79
|
return (
|
|
@@ -93,7 +93,7 @@ export const ContextMenuItem = React.forwardRef<
|
|
|
93
93
|
ContextMenuItem.displayName = 'ContextMenuItem';
|
|
94
94
|
|
|
95
95
|
export const ContextMenuCheckboxItem = React.forwardRef<
|
|
96
|
-
React.
|
|
96
|
+
React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,
|
|
97
97
|
ContextMenuCheckboxItemBaseProps
|
|
98
98
|
>(({ className, children, checked, onCheckedChange, ...props }, ref) => {
|
|
99
99
|
return (
|
|
@@ -119,7 +119,7 @@ export const ContextMenuCheckboxItem = React.forwardRef<
|
|
|
119
119
|
ContextMenuCheckboxItem.displayName = 'ContextMenuCheckboxItem';
|
|
120
120
|
|
|
121
121
|
export const ContextMenuRadioItem = React.forwardRef<
|
|
122
|
-
React.
|
|
122
|
+
React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,
|
|
123
123
|
ContextMenuRadioItemBaseProps
|
|
124
124
|
>(({ className, children, value, ...props }, ref) => {
|
|
125
125
|
return (
|
|
@@ -144,7 +144,7 @@ export const ContextMenuRadioItem = React.forwardRef<
|
|
|
144
144
|
ContextMenuRadioItem.displayName = 'ContextMenuRadioItem';
|
|
145
145
|
|
|
146
146
|
export const ContextMenuLabel = React.forwardRef<
|
|
147
|
-
React.
|
|
147
|
+
React.ComponentRef<typeof ContextMenuPrimitive.Label>,
|
|
148
148
|
ContextMenuLabelBaseProps
|
|
149
149
|
>(({ className, children, inset, ...props }, ref) => {
|
|
150
150
|
return (
|
|
@@ -160,7 +160,7 @@ export const ContextMenuLabel = React.forwardRef<
|
|
|
160
160
|
ContextMenuLabel.displayName = 'ContextMenuLabel';
|
|
161
161
|
|
|
162
162
|
export const ContextMenuSeparator = React.forwardRef<
|
|
163
|
-
React.
|
|
163
|
+
React.ComponentRef<typeof ContextMenuPrimitive.Separator>,
|
|
164
164
|
ContextMenuSeparatorBaseProps
|
|
165
165
|
>(({ className, ...props }, ref) => {
|
|
166
166
|
return <ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />;
|
|
@@ -177,7 +177,7 @@ export const ContextMenuShortcut = ({ className, children, ...props }: ContextMe
|
|
|
177
177
|
ContextMenuShortcut.displayName = 'ContextMenuShortcut';
|
|
178
178
|
|
|
179
179
|
export const ContextMenuSubTrigger = React.forwardRef<
|
|
180
|
-
React.
|
|
180
|
+
React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,
|
|
181
181
|
ContextMenuSubTriggerBaseProps
|
|
182
182
|
>(({ className, children, inset, ...props }, ref) => {
|
|
183
183
|
return (
|
|
@@ -198,7 +198,7 @@ export const ContextMenuSubTrigger = React.forwardRef<
|
|
|
198
198
|
ContextMenuSubTrigger.displayName = 'ContextMenuSubTrigger';
|
|
199
199
|
|
|
200
200
|
export const ContextMenuSubContent = React.forwardRef<
|
|
201
|
-
React.
|
|
201
|
+
React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,
|
|
202
202
|
ContextMenuSubContentBaseProps
|
|
203
203
|
>(({ className, children, ...props }, ref) => {
|
|
204
204
|
return (
|
package/src/dialog.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const DialogPortal = DialogPrimitive.Portal;
|
|
|
25
25
|
const DialogClose = DialogPrimitive.Close;
|
|
26
26
|
|
|
27
27
|
export type DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
28
|
-
export type DialogOverlayRef = React.
|
|
28
|
+
export type DialogOverlayRef = React.ComponentRef<typeof DialogPrimitive.Overlay>;
|
|
29
29
|
|
|
30
30
|
const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<DialogOverlayRef>> =
|
|
31
31
|
React.forwardRef<DialogOverlayRef, DialogOverlayProps>(({ className, ...props }, ref) => {
|
|
@@ -41,7 +41,7 @@ const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.
|
|
|
41
41
|
});
|
|
42
42
|
DialogOverlay.displayName = DialogPrimitive.Overlay?.displayName || 'DialogOverlay';
|
|
43
43
|
|
|
44
|
-
export type DialogContentRef = React.
|
|
44
|
+
export type DialogContentRef = React.ComponentRef<typeof DialogPrimitive.Content>;
|
|
45
45
|
const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<DialogContentRef>> =
|
|
46
46
|
React.forwardRef<DialogContentRef, DialogContentProps>(
|
|
47
47
|
({ className, children, portalHost, overlayClassName, overlayStyle, ...props }, ref) => {
|
|
@@ -86,7 +86,7 @@ const DialogFooter = ({ className, ...props }: React.ComponentPropsWithoutRef<ty
|
|
|
86
86
|
);
|
|
87
87
|
DialogFooter.displayName = 'DialogFooter';
|
|
88
88
|
|
|
89
|
-
export type DialogTitleRef = React.
|
|
89
|
+
export type DialogTitleRef = React.ComponentRef<typeof DialogPrimitive.Title>;
|
|
90
90
|
export type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
|
91
91
|
const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<DialogTitleRef>> =
|
|
92
92
|
React.forwardRef<DialogTitleRef, DialogTitleProps>(({ className, ...props }, ref) => (
|
|
@@ -98,7 +98,7 @@ const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefA
|
|
|
98
98
|
));
|
|
99
99
|
DialogTitle.displayName = DialogPrimitive.Title?.displayName || 'DialogTitle';
|
|
100
100
|
|
|
101
|
-
export type DialogDescriptionRef = React.
|
|
101
|
+
export type DialogDescriptionRef = React.ComponentRef<typeof DialogPrimitive.Description>;
|
|
102
102
|
export type DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
103
103
|
const DialogDescription: React.ForwardRefExoticComponent<
|
|
104
104
|
DialogDescriptionProps & React.RefAttributes<DialogDescriptionRef>
|
package/src/drawer.tsx
CHANGED
|
@@ -21,12 +21,12 @@ export const Drawer: React.FC<DrawerBaseProps> = ({ children }) => {
|
|
|
21
21
|
Drawer.displayName = 'Drawer';
|
|
22
22
|
|
|
23
23
|
export const DrawerTrigger = React.forwardRef<
|
|
24
|
-
React.
|
|
24
|
+
React.ComponentRef<typeof DialogPrimitive.Trigger>,
|
|
25
25
|
DrawerTriggerBaseProps & { className?: string }
|
|
26
26
|
>(({ children, className, ...props }, ref) => {
|
|
27
27
|
return (
|
|
28
28
|
<DialogPrimitive.Trigger ref={ref} className={className} {...props}>
|
|
29
|
-
{wrapTextChildren(children)}
|
|
29
|
+
{wrapTextChildren(children as React.ReactNode)}
|
|
30
30
|
</DialogPrimitive.Trigger>
|
|
31
31
|
);
|
|
32
32
|
});
|
|
@@ -35,7 +35,7 @@ DrawerTrigger.displayName = 'DrawerTrigger';
|
|
|
35
35
|
export const DrawerPortal = DialogPrimitive.Portal;
|
|
36
36
|
|
|
37
37
|
export type DrawerOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
|
38
|
-
export type DrawerOverlayRef = React.
|
|
38
|
+
export type DrawerOverlayRef = React.ComponentRef<typeof DialogPrimitive.Overlay>;
|
|
39
39
|
|
|
40
40
|
export const DrawerOverlay: React.ForwardRefExoticComponent<
|
|
41
41
|
DrawerOverlayProps & React.RefAttributes<DrawerOverlayRef>
|
|
@@ -53,7 +53,7 @@ export const DrawerOverlay: React.ForwardRefExoticComponent<
|
|
|
53
53
|
DrawerOverlay.displayName = 'DrawerOverlay';
|
|
54
54
|
|
|
55
55
|
export const DrawerContent = React.forwardRef<
|
|
56
|
-
React.
|
|
56
|
+
React.ComponentRef<typeof DialogPrimitive.Content>,
|
|
57
57
|
DrawerContentBaseProps & {
|
|
58
58
|
portalHost?: string;
|
|
59
59
|
overlayClassName?: string;
|
|
@@ -83,31 +83,31 @@ DrawerContent.displayName = 'DrawerContent';
|
|
|
83
83
|
|
|
84
84
|
export const DrawerHeader = ({ className, children, ...props }: DrawerHeaderBaseProps) => (
|
|
85
85
|
<View className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props}>
|
|
86
|
-
{wrapTextChildren(children)}
|
|
86
|
+
{wrapTextChildren(children as React.ReactNode)}
|
|
87
87
|
</View>
|
|
88
88
|
);
|
|
89
89
|
DrawerHeader.displayName = 'DrawerHeader';
|
|
90
90
|
|
|
91
91
|
export const DrawerFooter = ({ className, children, ...props }: DrawerFooterBaseProps) => (
|
|
92
92
|
<View className={cn('mt-auto flex flex-col gap-2', className)} {...props}>
|
|
93
|
-
{wrapTextChildren(children)}
|
|
93
|
+
{wrapTextChildren(children as React.ReactNode)}
|
|
94
94
|
</View>
|
|
95
95
|
);
|
|
96
96
|
DrawerFooter.displayName = 'DrawerFooter';
|
|
97
97
|
|
|
98
98
|
export const DrawerClose = React.forwardRef<
|
|
99
|
-
React.
|
|
99
|
+
React.ComponentRef<typeof DialogPrimitive.Close>,
|
|
100
100
|
DrawerCloseBaseProps & { className?: string }
|
|
101
101
|
>(({ children, className, ...props }, ref) => {
|
|
102
102
|
return (
|
|
103
103
|
<DialogPrimitive.Close ref={ref} className={className} {...props}>
|
|
104
|
-
{wrapTextChildren(children)}
|
|
104
|
+
{wrapTextChildren(children as React.ReactNode)}
|
|
105
105
|
</DialogPrimitive.Close>
|
|
106
106
|
);
|
|
107
107
|
});
|
|
108
108
|
DrawerClose.displayName = 'DrawerClose';
|
|
109
109
|
|
|
110
|
-
export const DrawerTitle = React.forwardRef<React.
|
|
110
|
+
export const DrawerTitle = React.forwardRef<React.ComponentRef<typeof DialogPrimitive.Title>, DrawerTitleBaseProps>(
|
|
111
111
|
({ className, children, ...props }, ref) => {
|
|
112
112
|
return (
|
|
113
113
|
<DialogPrimitive.Title
|
|
@@ -115,7 +115,7 @@ export const DrawerTitle = React.forwardRef<React.ElementRef<typeof DialogPrimit
|
|
|
115
115
|
className={cn('text-foreground text-lg leading-none font-semibold tracking-tight', className)}
|
|
116
116
|
{...props}
|
|
117
117
|
>
|
|
118
|
-
{wrapTextChildren(children)}
|
|
118
|
+
{wrapTextChildren(children as React.ReactNode)}
|
|
119
119
|
</DialogPrimitive.Title>
|
|
120
120
|
);
|
|
121
121
|
},
|
|
@@ -123,12 +123,12 @@ export const DrawerTitle = React.forwardRef<React.ElementRef<typeof DialogPrimit
|
|
|
123
123
|
DrawerTitle.displayName = 'DrawerTitle';
|
|
124
124
|
|
|
125
125
|
export const DrawerDescription = React.forwardRef<
|
|
126
|
-
React.
|
|
126
|
+
React.ComponentRef<typeof DialogPrimitive.Description>,
|
|
127
127
|
DrawerDescriptionBaseProps
|
|
128
128
|
>(({ className, children, ...props }, ref) => {
|
|
129
129
|
return (
|
|
130
130
|
<DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props}>
|
|
131
|
-
{wrapTextChildren(children)}
|
|
131
|
+
{wrapTextChildren(children as React.ReactNode)}
|
|
132
132
|
</DialogPrimitive.Description>
|
|
133
133
|
);
|
|
134
134
|
});
|
package/src/dropdown-menu.tsx
CHANGED
|
@@ -31,7 +31,7 @@ export const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
|
31
31
|
export const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
32
32
|
|
|
33
33
|
const DropdownMenuOverlay = React.forwardRef<
|
|
34
|
-
React.
|
|
34
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.Overlay>,
|
|
35
35
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Overlay>
|
|
36
36
|
>(({ className, ...props }, ref) => {
|
|
37
37
|
return (
|
|
@@ -51,7 +51,7 @@ const DropdownMenuOverlay = React.forwardRef<
|
|
|
51
51
|
DropdownMenuOverlay.displayName = 'DropdownMenuOverlay';
|
|
52
52
|
|
|
53
53
|
export const DropdownMenuContent = React.forwardRef<
|
|
54
|
-
React.
|
|
54
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.Content>,
|
|
55
55
|
DropdownMenuContentBaseProps
|
|
56
56
|
>(({ className, children, side, ...props }, ref) => {
|
|
57
57
|
const nativeSide = side === 'left' || side === 'right' ? 'bottom' : side;
|
|
@@ -75,7 +75,7 @@ export const DropdownMenuContent = React.forwardRef<
|
|
|
75
75
|
DropdownMenuContent.displayName = 'DropdownMenuContent';
|
|
76
76
|
|
|
77
77
|
export const DropdownMenuItem = React.forwardRef<
|
|
78
|
-
React.
|
|
78
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.Item>,
|
|
79
79
|
DropdownMenuItemBaseProps
|
|
80
80
|
>(({ className, children, inset, onSelect, ...props }, ref) => {
|
|
81
81
|
return (
|
|
@@ -96,7 +96,7 @@ export const DropdownMenuItem = React.forwardRef<
|
|
|
96
96
|
DropdownMenuItem.displayName = 'DropdownMenuItem';
|
|
97
97
|
|
|
98
98
|
export const DropdownMenuCheckboxItem = React.forwardRef<
|
|
99
|
-
React.
|
|
99
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
100
100
|
DropdownMenuCheckboxItemBaseProps
|
|
101
101
|
>(({ className, children, checked, onCheckedChange, ...props }, ref) => {
|
|
102
102
|
return (
|
|
@@ -122,7 +122,7 @@ export const DropdownMenuCheckboxItem = React.forwardRef<
|
|
|
122
122
|
DropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';
|
|
123
123
|
|
|
124
124
|
export const DropdownMenuRadioItem = React.forwardRef<
|
|
125
|
-
React.
|
|
125
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
126
126
|
DropdownMenuRadioItemBaseProps
|
|
127
127
|
>(({ className, children, value, ...props }, ref) => {
|
|
128
128
|
return (
|
|
@@ -147,7 +147,7 @@ export const DropdownMenuRadioItem = React.forwardRef<
|
|
|
147
147
|
DropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';
|
|
148
148
|
|
|
149
149
|
export const DropdownMenuLabel = React.forwardRef<
|
|
150
|
-
React.
|
|
150
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.Label>,
|
|
151
151
|
DropdownMenuLabelBaseProps
|
|
152
152
|
>(({ className, children, inset, ...props }, ref) => {
|
|
153
153
|
return (
|
|
@@ -156,14 +156,14 @@ export const DropdownMenuLabel = React.forwardRef<
|
|
|
156
156
|
className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
|
|
157
157
|
{...props}
|
|
158
158
|
>
|
|
159
|
-
{wrapTextChildren(children, Text)}
|
|
159
|
+
{wrapTextChildren(children as React.ReactNode, Text)}
|
|
160
160
|
</DropdownMenuPrimitive.Label>
|
|
161
161
|
);
|
|
162
162
|
});
|
|
163
163
|
DropdownMenuLabel.displayName = 'DropdownMenuLabel';
|
|
164
164
|
|
|
165
165
|
export const DropdownMenuSeparator = React.forwardRef<
|
|
166
|
-
React.
|
|
166
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,
|
|
167
167
|
DropdownMenuSeparatorBaseProps
|
|
168
168
|
>(({ className, ...props }, ref) => {
|
|
169
169
|
return (
|
|
@@ -182,7 +182,7 @@ export const DropdownMenuShortcut = ({ className, children, ...props }: Dropdown
|
|
|
182
182
|
DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
|
|
183
183
|
|
|
184
184
|
export const DropdownMenuSubTrigger = React.forwardRef<
|
|
185
|
-
React.
|
|
185
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
186
186
|
DropdownMenuSubTriggerBaseProps
|
|
187
187
|
>(({ className, children, inset, ...props }, ref) => {
|
|
188
188
|
return (
|
|
@@ -195,7 +195,7 @@ export const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
195
195
|
)}
|
|
196
196
|
{...props}
|
|
197
197
|
>
|
|
198
|
-
<View className="flex flex-row items-center gap-1.5">{wrapTextChildren(children, Text)}</View>
|
|
198
|
+
<View className="flex flex-row items-center gap-1.5">{wrapTextChildren(children as React.ReactNode, Text)}</View>
|
|
199
199
|
<ChevronRight size={14} className="text-foreground ml-auto" />
|
|
200
200
|
</DropdownMenuPrimitive.SubTrigger>
|
|
201
201
|
);
|
|
@@ -203,7 +203,7 @@ export const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
203
203
|
DropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';
|
|
204
204
|
|
|
205
205
|
export const DropdownMenuSubContent = React.forwardRef<
|
|
206
|
-
React.
|
|
206
|
+
React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
207
207
|
DropdownMenuSubContentBaseProps
|
|
208
208
|
>(({ className, children, ...props }, ref) => {
|
|
209
209
|
return (
|
package/src/form.tsx
CHANGED
|
@@ -79,7 +79,7 @@ type FormItemContextValue = {
|
|
|
79
79
|
const FormItemContext = React.createContext<FormItemContextValue | null>(null);
|
|
80
80
|
|
|
81
81
|
const FormItem = React.forwardRef<
|
|
82
|
-
React.
|
|
82
|
+
React.ComponentRef<typeof View>,
|
|
83
83
|
React.ComponentPropsWithoutRef<typeof View> & FormItemBaseProps
|
|
84
84
|
>(({ className, ...props }, ref) => {
|
|
85
85
|
const id = React.useId();
|
|
@@ -93,7 +93,7 @@ const FormItem = React.forwardRef<
|
|
|
93
93
|
FormItem.displayName = 'FormItem';
|
|
94
94
|
|
|
95
95
|
const FormLabel = React.forwardRef<
|
|
96
|
-
React.
|
|
96
|
+
React.ComponentRef<typeof Label>,
|
|
97
97
|
React.ComponentPropsWithoutRef<typeof Label> & FormLabelBaseProps
|
|
98
98
|
>(({ className, ...props }, ref) => {
|
|
99
99
|
const { error, formItemId } = useFormField();
|
|
@@ -103,8 +103,8 @@ const FormLabel = React.forwardRef<
|
|
|
103
103
|
FormLabel.displayName = 'FormLabel';
|
|
104
104
|
|
|
105
105
|
const FormControl = React.forwardRef<
|
|
106
|
-
React.
|
|
107
|
-
React.ComponentPropsWithoutRef<typeof Slot.Slot>
|
|
106
|
+
React.ComponentRef<typeof Slot.Slot>,
|
|
107
|
+
React.ComponentPropsWithoutRef<typeof Slot.Slot> & FormControlBaseProps & { children?: React.ReactNode }
|
|
108
108
|
>(({ ...props }, ref) => {
|
|
109
109
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
110
110
|
|
|
@@ -121,7 +121,7 @@ const FormControl = React.forwardRef<
|
|
|
121
121
|
FormControl.displayName = 'FormControl';
|
|
122
122
|
|
|
123
123
|
const FormDescription = React.forwardRef<
|
|
124
|
-
React.
|
|
124
|
+
React.ComponentRef<typeof Text>,
|
|
125
125
|
React.ComponentPropsWithoutRef<typeof Text> & FormDescriptionBaseProps
|
|
126
126
|
>(({ className, ...props }, ref) => {
|
|
127
127
|
const { formDescriptionId } = useFormField();
|
|
@@ -138,7 +138,7 @@ const FormDescription = React.forwardRef<
|
|
|
138
138
|
FormDescription.displayName = 'FormDescription';
|
|
139
139
|
|
|
140
140
|
const FormMessage = React.forwardRef<
|
|
141
|
-
React.
|
|
141
|
+
React.ComponentRef<typeof Text>,
|
|
142
142
|
React.ComponentPropsWithoutRef<typeof Text> & FormMessageBaseProps
|
|
143
143
|
>(({ className, children, ...props }, ref) => {
|
|
144
144
|
const { error, formMessageId } = useFormField();
|