@@ -19,15 +19,15 @@ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
19
19
const DropdownMenuRadioGroup = DropdownMenuPrimitive . RadioGroup ;
20
20
21
21
const DropdownMenuSubTrigger = React . forwardRef <
22
- React . ElementRef < typeof DropdownMenuPrimitive . SubTrigger > ,
22
+ React . ComponentRef < typeof DropdownMenuPrimitive . SubTrigger > ,
23
23
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . SubTrigger > & {
24
24
inset ?: boolean ;
25
25
}
26
26
> ( ( { className, inset, children, ...props } , ref ) => (
27
27
< DropdownMenuPrimitive . SubTrigger
28
28
ref = { ref }
29
29
className = { cn (
30
- 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent' ,
30
+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent' ,
31
31
inset && 'pl-8' ,
32
32
className
33
33
) }
@@ -41,7 +41,7 @@ DropdownMenuSubTrigger.displayName =
41
41
DropdownMenuPrimitive . SubTrigger . displayName ;
42
42
43
43
const DropdownMenuSubContent = React . forwardRef <
44
- React . ElementRef < typeof DropdownMenuPrimitive . SubContent > ,
44
+ React . ComponentRef < typeof DropdownMenuPrimitive . SubContent > ,
45
45
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . SubContent >
46
46
> ( ( { className, ...props } , ref ) => (
47
47
< DropdownMenuPrimitive . SubContent
@@ -57,7 +57,7 @@ DropdownMenuSubContent.displayName =
57
57
DropdownMenuPrimitive . SubContent . displayName ;
58
58
59
59
const DropdownMenuContent = React . forwardRef <
60
- React . ElementRef < typeof DropdownMenuPrimitive . Content > ,
60
+ React . ComponentRef < typeof DropdownMenuPrimitive . Content > ,
61
61
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Content >
62
62
> ( ( { className, sideOffset = 4 , ...props } , ref ) => (
63
63
< DropdownMenuPrimitive . Portal >
@@ -75,15 +75,15 @@ const DropdownMenuContent = React.forwardRef<
75
75
DropdownMenuContent . displayName = DropdownMenuPrimitive . Content . displayName ;
76
76
77
77
const DropdownMenuItem = React . forwardRef <
78
- React . ElementRef < typeof DropdownMenuPrimitive . Item > ,
78
+ React . ComponentRef < typeof DropdownMenuPrimitive . Item > ,
79
79
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Item > & {
80
80
inset ?: boolean ;
81
81
}
82
82
> ( ( { className, inset, ...props } , ref ) => (
83
83
< DropdownMenuPrimitive . Item
84
84
ref = { ref }
85
85
className = { cn (
86
- 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[ disabled] :pointer-events-none data-[ disabled] :opacity-50' ,
86
+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50' ,
87
87
inset && 'pl-8' ,
88
88
className
89
89
) }
@@ -93,13 +93,13 @@ const DropdownMenuItem = React.forwardRef<
93
93
DropdownMenuItem . displayName = DropdownMenuPrimitive . Item . displayName ;
94
94
95
95
const DropdownMenuCheckboxItem = React . forwardRef <
96
- React . ElementRef < typeof DropdownMenuPrimitive . CheckboxItem > ,
96
+ React . ComponentRef < typeof DropdownMenuPrimitive . CheckboxItem > ,
97
97
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . CheckboxItem >
98
98
> ( ( { className, children, checked, ...props } , ref ) => (
99
99
< DropdownMenuPrimitive . CheckboxItem
100
100
ref = { ref }
101
101
className = { cn (
102
- 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[ disabled] :pointer-events-none data-[ disabled] :opacity-50' ,
102
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50' ,
103
103
className
104
104
) }
105
105
checked = { checked }
@@ -117,13 +117,13 @@ DropdownMenuCheckboxItem.displayName =
117
117
DropdownMenuPrimitive . CheckboxItem . displayName ;
118
118
119
119
const DropdownMenuRadioItem = React . forwardRef <
120
- React . ElementRef < typeof DropdownMenuPrimitive . RadioItem > ,
120
+ React . ComponentRef < typeof DropdownMenuPrimitive . RadioItem > ,
121
121
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . RadioItem >
122
122
> ( ( { className, children, ...props } , ref ) => (
123
123
< DropdownMenuPrimitive . RadioItem
124
124
ref = { ref }
125
125
className = { cn (
126
- 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[ disabled] :pointer-events-none data-[ disabled] :opacity-50' ,
126
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50' ,
127
127
className
128
128
) }
129
129
{ ...props }
@@ -139,7 +139,7 @@ const DropdownMenuRadioItem = React.forwardRef<
139
139
DropdownMenuRadioItem . displayName = DropdownMenuPrimitive . RadioItem . displayName ;
140
140
141
141
const DropdownMenuLabel = React . forwardRef <
142
- React . ElementRef < typeof DropdownMenuPrimitive . Label > ,
142
+ React . ComponentRef < typeof DropdownMenuPrimitive . Label > ,
143
143
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Label > & {
144
144
inset ?: boolean ;
145
145
}
@@ -157,7 +157,7 @@ const DropdownMenuLabel = React.forwardRef<
157
157
DropdownMenuLabel . displayName = DropdownMenuPrimitive . Label . displayName ;
158
158
159
159
const DropdownMenuSeparator = React . forwardRef <
160
- React . ElementRef < typeof DropdownMenuPrimitive . Separator > ,
160
+ React . ComponentRef < typeof DropdownMenuPrimitive . Separator > ,
161
161
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Separator >
162
162
> ( ( { className, ...props } , ref ) => (
163
163
< DropdownMenuPrimitive . Separator
0 commit comments