|
|
@@ -1,12 +1,12 @@
|
|
|
-import * as React from "react"
|
|
|
-import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
|
|
+import * as React from 'react'
|
|
|
+import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'
|
|
|
import {
|
|
|
CheckIcon,
|
|
|
ChevronRightIcon,
|
|
|
DotFilledIcon,
|
|
|
-} from "@radix-ui/react-icons"
|
|
|
+} from '@radix-ui/react-icons'
|
|
|
|
|
|
-import { cn } from "@/lib/utils"
|
|
|
+import { cn } from '@/lib/utils'
|
|
|
|
|
|
const DropdownMenu = DropdownMenuPrimitive.Root
|
|
|
|
|
|
@@ -29,14 +29,14 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
<DropdownMenuPrimitive.SubTrigger
|
|
|
ref={ref}
|
|
|
className={cn(
|
|
|
- "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",
|
|
|
- inset && "pl-8",
|
|
|
+ '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',
|
|
|
+ inset && 'pl-8',
|
|
|
className
|
|
|
)}
|
|
|
{...props}
|
|
|
>
|
|
|
{children}
|
|
|
- <ChevronRightIcon className="ml-auto h-4 w-4" />
|
|
|
+ <ChevronRightIcon className='ml-auto h-4 w-4' />
|
|
|
</DropdownMenuPrimitive.SubTrigger>
|
|
|
))
|
|
|
DropdownMenuSubTrigger.displayName =
|
|
|
@@ -49,7 +49,7 @@ const DropdownMenuSubContent = React.forwardRef<
|
|
|
<DropdownMenuPrimitive.SubContent
|
|
|
ref={ref}
|
|
|
className={cn(
|
|
|
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",
|
|
|
+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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',
|
|
|
className
|
|
|
)}
|
|
|
{...props}
|
|
|
@@ -67,8 +67,8 @@ const DropdownMenuContent = React.forwardRef<
|
|
|
ref={ref}
|
|
|
sideOffset={sideOffset}
|
|
|
className={cn(
|
|
|
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
|
- "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",
|
|
|
+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md',
|
|
|
+ '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',
|
|
|
className
|
|
|
)}
|
|
|
{...props}
|
|
|
@@ -86,8 +86,8 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
<DropdownMenuPrimitive.Item
|
|
|
ref={ref}
|
|
|
className={cn(
|
|
|
- "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",
|
|
|
- inset && "pl-8",
|
|
|
+ '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',
|
|
|
+ inset && 'pl-8',
|
|
|
className
|
|
|
)}
|
|
|
{...props}
|
|
|
@@ -102,15 +102,15 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
|
|
<DropdownMenuPrimitive.CheckboxItem
|
|
|
ref={ref}
|
|
|
className={cn(
|
|
|
- "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",
|
|
|
+ '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',
|
|
|
className
|
|
|
)}
|
|
|
checked={checked}
|
|
|
{...props}
|
|
|
>
|
|
|
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
|
+ <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
|
- <CheckIcon className="h-4 w-4" />
|
|
|
+ <CheckIcon className='h-4 w-4' />
|
|
|
</DropdownMenuPrimitive.ItemIndicator>
|
|
|
</span>
|
|
|
{children}
|
|
|
@@ -126,14 +126,14 @@ const DropdownMenuRadioItem = React.forwardRef<
|
|
|
<DropdownMenuPrimitive.RadioItem
|
|
|
ref={ref}
|
|
|
className={cn(
|
|
|
- "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",
|
|
|
+ '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',
|
|
|
className
|
|
|
)}
|
|
|
{...props}
|
|
|
>
|
|
|
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
|
+ <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
|
<DropdownMenuPrimitive.ItemIndicator>
|
|
|
- <DotFilledIcon className="h-4 w-4 fill-current" />
|
|
|
+ <DotFilledIcon className='h-4 w-4 fill-current' />
|
|
|
</DropdownMenuPrimitive.ItemIndicator>
|
|
|
</span>
|
|
|
{children}
|
|
|
@@ -150,8 +150,8 @@ const DropdownMenuLabel = React.forwardRef<
|
|
|
<DropdownMenuPrimitive.Label
|
|
|
ref={ref}
|
|
|
className={cn(
|
|
|
- "px-2 py-1.5 text-sm font-semibold",
|
|
|
- inset && "pl-8",
|
|
|
+ 'px-2 py-1.5 text-sm font-semibold',
|
|
|
+ inset && 'pl-8',
|
|
|
className
|
|
|
)}
|
|
|
{...props}
|
|
|
@@ -165,7 +165,7 @@ const DropdownMenuSeparator = React.forwardRef<
|
|
|
>(({ className, ...props }, ref) => (
|
|
|
<DropdownMenuPrimitive.Separator
|
|
|
ref={ref}
|
|
|
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
|
+ className={cn('-mx-1 my-1 h-px bg-muted', className)}
|
|
|
{...props}
|
|
|
/>
|
|
|
))
|
|
|
@@ -177,12 +177,12 @@ const DropdownMenuShortcut = ({
|
|
|
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
|
return (
|
|
|
<span
|
|
|
- className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
|
|
|
+ className={cn('ml-auto text-xs tracking-widest opacity-60', className)}
|
|
|
{...props}
|
|
|
/>
|
|
|
)
|
|
|
}
|
|
|
-DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
|
|
|
+DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'
|
|
|
|
|
|
export {
|
|
|
DropdownMenu,
|