From 175ec98947b02bf4a18179acf24d128c5a2240f9 Mon Sep 17 00:00:00 2001 From: coolcoala Date: Sat, 9 Aug 2025 02:36:23 +0300 Subject: [PATCH] added glass effect to components --- src/components/ui/dropdown-menu.tsx | 329 +++++++++++++++------------- src/components/ui/select.tsx | 288 ++++++++++++------------ 2 files changed, 329 insertions(+), 288 deletions(-) diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx index 1f188247..6aa3a726 100644 --- a/src/components/ui/dropdown-menu.tsx +++ b/src/components/ui/dropdown-menu.tsx @@ -5,234 +5,263 @@ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"; import { cn } from "@root/lib/utils"; function DropdownMenu({ - ...props -}: React.ComponentProps) { + ...props + }: React.ComponentProps) { return ; } function DropdownMenuPortal({ - ...props -}: React.ComponentProps) { + ...props + }: React.ComponentProps) { return ( - + ); } function DropdownMenuTrigger({ - ...props -}: React.ComponentProps) { - return ( - - ); + ...props + }: React.ComponentProps) { + return ( + + ); } function DropdownMenuContent({ - className, - sideOffset = 4, - ...props -}: React.ComponentProps) { - return ( - - - + className, + sideOffset = 4, + ...props + }: React.ComponentProps) { + return ( + + + ); } function DropdownMenuGroup({ - ...props -}: React.ComponentProps) { - return ( - - ); + ...props + }: React.ComponentProps) { + return ( + + ); } function DropdownMenuItem({ - className, - inset, - variant = "default", - ...props -}: React.ComponentProps & { + className, + inset, + variant = "default", + ...props + }: React.ComponentProps & { inset?: boolean; variant?: "default" | "destructive"; }) { return ( - + ); } function DropdownMenuCheckboxItem({ - className, - children, - checked, - ...props -}: React.ComponentProps) { + className, + children, + checked, + ...props + }: React.ComponentProps) { return ( - + - {children} - + {children} + ); } function DropdownMenuRadioGroup({ - ...props -}: React.ComponentProps) { - return ( - - ); + ...props + }: React.ComponentProps) { + return ( + + ); } function DropdownMenuRadioItem({ - className, - children, - ...props -}: React.ComponentProps) { + className, + children, + ...props + }: React.ComponentProps) { return ( - + - {children} - + {children} + ); } function DropdownMenuLabel({ - className, - inset, - ...props -}: React.ComponentProps & { + className, + inset, + ...props + }: React.ComponentProps & { inset?: boolean; }) { return ( - + ); } function DropdownMenuSeparator({ - className, - ...props -}: React.ComponentProps) { + className, + ...props + }: React.ComponentProps) { return ( - + ); } function DropdownMenuShortcut({ - className, - ...props -}: React.ComponentProps<"span">) { + className, + ...props + }: React.ComponentProps<"span">) { return ( - + ); } function DropdownMenuSub({ - ...props -}: React.ComponentProps) { + ...props + }: React.ComponentProps) { return ; } function DropdownMenuSubTrigger({ - className, - inset, - children, - ...props -}: React.ComponentProps & { + className, + inset, + children, + ...props + }: React.ComponentProps & { inset?: boolean; }) { return ( - - {children} - - + + {children} + + ); } function DropdownMenuSubContent({ - className, - ...props -}: React.ComponentProps) { + className, + ...props + }: React.ComponentProps) { return ( - + ); } @@ -252,4 +281,4 @@ export { DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, -}; +}; \ No newline at end of file diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx index ec0b312a..52718692 100644 --- a/src/components/ui/select.tsx +++ b/src/components/ui/select.tsx @@ -5,179 +5,191 @@ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"; import { cn } from "@root/lib/utils"; function Select({ - ...props -}: React.ComponentProps) { - return ; + ...props + }: React.ComponentProps) { + return ; } function SelectGroup({ - ...props -}: React.ComponentProps) { - return ; + ...props + }: React.ComponentProps) { + return ; } function SelectValue({ - ...props -}: React.ComponentProps) { - return ; + ...props + }: React.ComponentProps) { + return ; } function SelectTrigger({ - className, - size = "default", - children, - ...props -}: React.ComponentProps & { - size?: "sm" | "default"; + className, + size = "default", + children, + ...props + }: React.ComponentProps & { + size?: "sm" | "default"; }) { - return ( - - {children} - - - - - ); + return ( + + {children} + + + + + ); } function SelectContent({ - className, - children, - position = "popper", - ...props -}: React.ComponentProps) { - return ( - - - - - {children} - - - - - ); + className, + children, + position = "popper", + ...props + }: React.ComponentProps) { + return ( + + + + + {children} + + + + + ); } function SelectLabel({ - className, - ...props -}: React.ComponentProps) { - return ( - - ); + className, + ...props + }: React.ComponentProps) { + return ( + + ); } function SelectItem({ - className, - children, - ...props -}: React.ComponentProps) { - return ( - + children, + ...props + }: React.ComponentProps) { + return ( + - {children} - - ); + {children} + + ); } function SelectSeparator({ - className, - ...props -}: React.ComponentProps) { - return ( - - ); + className, + ...props + }: React.ComponentProps) { + return ( + + ); } function SelectScrollUpButton({ - className, - ...props -}: React.ComponentProps) { - return ( - - - - ); + className, + ...props + }: React.ComponentProps) { + return ( + + + + ); } function SelectScrollDownButton({ - className, - ...props -}: React.ComponentProps) { - return ( - - - - ); + ...props + }: React.ComponentProps) { + return ( + + + + ); } export { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectLabel, - SelectScrollDownButton, - SelectScrollUpButton, - SelectSeparator, - SelectTrigger, - SelectValue, -}; + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectScrollDownButton, + SelectScrollUpButton, + SelectSeparator, + SelectTrigger, + SelectValue, +}; \ No newline at end of file