1
1
import * as React from "react"
2
2
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
3
+ import { cn } from "@/lib/utils"
3
4
import { CheckIcon , ChevronRightIcon , DotFilledIcon } from "@radix-ui/react-icons"
4
-
5
5
import { portalRoot } from "@/lib/portal-root"
6
- import { cn } from "@/lib/utils"
7
6
8
7
const DropdownMenu = DropdownMenuPrimitive . Root
9
8
@@ -26,14 +25,14 @@ const DropdownMenuSubTrigger = React.forwardRef<
26
25
< DropdownMenuPrimitive . SubTrigger
27
26
ref = { ref }
28
27
className = { cn (
29
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-zinc -100 data-[state=open]:bg-zinc -100 dark:focus:bg-zinc -800 dark:data-[state=open]:bg-zinc -800" ,
28
+ "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral -100 data-[state=open]:bg-neutral -100 dark:focus:bg-neutral -800 dark:data-[state=open]:bg-neutral -800 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 " ,
30
29
inset && "pl-8" ,
31
30
className
32
31
) }
33
32
{ ...props }
34
33
>
35
34
{ children }
36
- < ChevronRightIcon className = "ml-auto size-4 " />
35
+ < ChevronRightIcon className = "ml-auto" />
37
36
</ DropdownMenuPrimitive . SubTrigger >
38
37
) )
39
38
DropdownMenuSubTrigger . displayName = DropdownMenuPrimitive . SubTrigger . displayName
@@ -45,7 +44,7 @@ const DropdownMenuSubContent = React.forwardRef<
45
44
< DropdownMenuPrimitive . SubContent
46
45
ref = { ref }
47
46
className = { cn (
48
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50" ,
47
+ "z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50" ,
49
48
className
50
49
) }
51
50
{ ...props }
@@ -62,8 +61,8 @@ const DropdownMenuContent = React.forwardRef<
62
61
ref = { ref }
63
62
sideOffset = { sideOffset }
64
63
className = { cn (
65
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50" ,
66
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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" ,
64
+ "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x -hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50" ,
65
+ "origin-[--radix-dropdown-menu-content-transform-origin] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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" ,
67
66
className
68
67
) }
69
68
{ ...props }
@@ -105,7 +104,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
105
104
>
106
105
< span className = "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" >
107
106
< DropdownMenuPrimitive . ItemIndicator >
108
- < CheckIcon className = "size -4" />
107
+ < CheckIcon className = "h-4 w -4" />
109
108
</ DropdownMenuPrimitive . ItemIndicator >
110
109
</ span >
111
110
{ children }
@@ -127,7 +126,7 @@ const DropdownMenuRadioItem = React.forwardRef<
127
126
>
128
127
< span className = "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" >
129
128
< DropdownMenuPrimitive . ItemIndicator >
130
- < DotFilledIcon className = "size-4 fill-current" />
129
+ < DotFilledIcon className = "h-2 w-2 fill-current" />
131
130
</ DropdownMenuPrimitive . ItemIndicator >
132
131
</ span >
133
132
{ children }
0 commit comments