diff --git a/client/components/ui/Skeleton.jsx b/client/components/ui/Skeleton.jsx index 939d336..8692657 100644 --- a/client/components/ui/Skeleton.jsx +++ b/client/components/ui/Skeleton.jsx @@ -1,7 +1,6 @@ -import * as React from 'react'; import { cn } from '@/lib/utils'; -const Skeleton = React.forwardRef(({ className, variant = 'line', ...props }, ref) => { +function Skeleton({ className, variant = 'line', ref, ...props }) { const variants = { line: 'h-4 w-full rounded-md', circle: 'h-10 w-10 rounded-full', @@ -21,7 +20,6 @@ const Skeleton = React.forwardRef(({ className, variant = 'line', ...props }, re {...props} /> ); -}); -Skeleton.displayName = 'Skeleton'; +} export { Skeleton }; diff --git a/client/components/ui/badge.jsx b/client/components/ui/badge.jsx index 9951dc4..66ceb37 100644 --- a/client/components/ui/badge.jsx +++ b/client/components/ui/badge.jsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { cva } from 'class-variance-authority'; import { cn } from '@/lib/utils'; diff --git a/client/components/ui/button.jsx b/client/components/ui/button.jsx index dc8f55b..4cf7256 100644 --- a/client/components/ui/button.jsx +++ b/client/components/ui/button.jsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Slot } from '@radix-ui/react-slot'; import { cva } from 'class-variance-authority'; import { cn } from '@/lib/utils'; @@ -29,7 +28,7 @@ const buttonVariants = cva( } ); -const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => { +function Button({ className, variant, size, asChild = false, ref, ...props }) { const Comp = asChild ? Slot : 'button'; return ( ); -}); -Button.displayName = 'Button'; +} export { Button, buttonVariants }; diff --git a/client/components/ui/card.jsx b/client/components/ui/card.jsx index c4c6d4c..01e4e9f 100644 --- a/client/components/ui/card.jsx +++ b/client/components/ui/card.jsx @@ -1,58 +1,63 @@ -import * as React from 'react'; import { cn } from '@/lib/utils'; -const Card = React.forwardRef(({ className, ...props }, ref) => ( -
-)); -Card.displayName = 'Card'; +function Card({ className, ref, ...props }) { + return ( +
+ ); +} -const CardHeader = React.forwardRef(({ className, ...props }, ref) => ( -
-)); -CardHeader.displayName = 'CardHeader'; +function CardHeader({ className, ref, ...props }) { + return ( +
+ ); +} -const CardTitle = React.forwardRef(({ className, ...props }, ref) => ( -
-)); -CardTitle.displayName = 'CardTitle'; +function CardTitle({ className, ref, ...props }) { + return ( +
+ ); +} -const CardDescription = React.forwardRef(({ className, ...props }, ref) => ( -
-)); -CardDescription.displayName = 'CardDescription'; +function CardDescription({ className, ref, ...props }) { + return ( +
+ ); +} -const CardContent = React.forwardRef(({ className, ...props }, ref) => ( -
-)); -CardContent.displayName = 'CardContent'; +function CardContent({ className, ref, ...props }) { + return ( +
+ ); +} -const CardFooter = React.forwardRef(({ className, ...props }, ref) => ( -
-)); -CardFooter.displayName = 'CardFooter'; +function CardFooter({ className, ref, ...props }) { + return ( +
+ ); +} export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter }; diff --git a/client/components/ui/checkbox.jsx b/client/components/ui/checkbox.jsx index 5c5e44a..d76081b 100644 --- a/client/components/ui/checkbox.jsx +++ b/client/components/ui/checkbox.jsx @@ -1,24 +1,24 @@ -import * as React from 'react'; import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; import { Check } from 'lucide-react'; import { cn } from '@/lib/utils'; -const Checkbox = React.forwardRef(({ className, ...props }, ref) => ( - - - - - -)); -Checkbox.displayName = CheckboxPrimitive.Root.displayName; + + + + + ); +} export { Checkbox }; diff --git a/client/components/ui/collapsible.jsx b/client/components/ui/collapsible.jsx index 7ffc051..d64e1fe 100644 --- a/client/components/ui/collapsible.jsx +++ b/client/components/ui/collapsible.jsx @@ -1,17 +1,16 @@ -import * as React from 'react'; import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'; const Collapsible = CollapsiblePrimitive.Root; - const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; -const CollapsibleContent = React.forwardRef(({ className, ...props }, ref) => ( - -)); -CollapsibleContent.displayName = CollapsiblePrimitive.Content.displayName; +function CollapsibleContent({ ref, ...props }) { + return ( + + ); +} -export { Collapsible, CollapsibleTrigger, CollapsibleContent }; \ No newline at end of file +export { Collapsible, CollapsibleTrigger, CollapsibleContent }; diff --git a/client/components/ui/dialog.jsx b/client/components/ui/dialog.jsx index fac0110..c77e9b5 100644 --- a/client/components/ui/dialog.jsx +++ b/client/components/ui/dialog.jsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { X } from 'lucide-react'; import { cn } from '@/lib/utils'; @@ -8,74 +7,80 @@ const DialogTrigger = DialogPrimitive.Trigger; const DialogPortal = DialogPrimitive.Portal; const DialogClose = DialogPrimitive.Close; -const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => ( - -)); -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; - -const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => ( - - - - {children} - - - Close - - - -)); -DialogContent.displayName = DialogPrimitive.Content.displayName; + /> + ); +} -const DialogHeader = ({ className, ...props }) => ( -
-); -DialogHeader.displayName = 'DialogHeader'; +function DialogContent({ className, children, ref, ...props }) { + return ( + + + + {children} + + + Close + + + + ); +} -const DialogFooter = ({ className, ...props }) => ( -
-); -DialogFooter.displayName = 'DialogFooter'; +function DialogHeader({ className, ...props }) { + return ( +
+ ); +} -const DialogTitle = React.forwardRef(({ className, ...props }, ref) => ( - -)); -DialogTitle.displayName = DialogPrimitive.Title.displayName; +function DialogFooter({ className, ...props }) { + return ( +
+ ); +} -const DialogDescription = React.forwardRef(({ className, ...props }, ref) => ( - -)); -DialogDescription.displayName = DialogPrimitive.Description.displayName; +function DialogTitle({ className, ref, ...props }) { + return ( + + ); +} + +function DialogDescription({ className, ref, ...props }) { + return ( + + ); +} export { Dialog, diff --git a/client/components/ui/input.jsx b/client/components/ui/input.jsx index 48f75c6..fcd0b4e 100644 --- a/client/components/ui/input.jsx +++ b/client/components/ui/input.jsx @@ -1,7 +1,6 @@ -import * as React from 'react'; import { cn } from '@/lib/utils'; -const Input = React.forwardRef(({ className, type, ...props }, ref) => { +function Input({ className, type, ref, ...props }) { return ( { {...props} /> ); -}); -Input.displayName = 'Input'; +} export { Input }; diff --git a/client/components/ui/label.jsx b/client/components/ui/label.jsx index 512af01..a63f6d9 100644 --- a/client/components/ui/label.jsx +++ b/client/components/ui/label.jsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import * as LabelPrimitive from '@radix-ui/react-label'; import { cva } from 'class-variance-authority'; import { cn } from '@/lib/utils'; @@ -7,13 +6,14 @@ const labelVariants = cva( 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70' ); -const Label = React.forwardRef(({ className, ...props }, ref) => ( - -)); -Label.displayName = LabelPrimitive.Root.displayName; +function Label({ className, ref, ...props }) { + return ( + + ); +} export { Label }; diff --git a/client/components/ui/select.jsx b/client/components/ui/select.jsx index ad85398..7bc742d 100644 --- a/client/components/ui/select.jsx +++ b/client/components/ui/select.jsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import * as SelectPrimitive from '@radix-ui/react-select'; import { Check, ChevronDown, ChevronUp } from 'lucide-react'; import { cn } from '@/lib/utils'; @@ -7,116 +6,123 @@ const Select = SelectPrimitive.Root; const SelectGroup = SelectPrimitive.Group; const SelectValue = SelectPrimitive.Value; -const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => ( - span]:line-clamp-1', - className - )} - aria-haspopup="listbox" - aria-expanded={false} - {...props} - > - {children} - - - - -)); -SelectTrigger.displayName = SelectPrimitive.Trigger.displayName; - -const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => ( - - - -)); -SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName; - -const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => ( - - - -)); -SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName; - -const SelectContent = React.forwardRef(({ className, children, position = 'popper', ...props }, ref) => ( - - span]:line-clamp-1', className )} - role="listbox" - aria-orientation="vertical" - position={position} + aria-haspopup="listbox" + aria-expanded={false} {...props} > - - + + + + ); +} + +function SelectScrollUpButton({ className, ref, ...props }) { + return ( + + + + ); +} + +function SelectScrollDownButton({ className, ref, ...props }) { + return ( + + + + ); +} + +function SelectContent({ className, children, position = 'popper', ref, ...props }) { + return ( + + - {children} - - - - -)); -SelectContent.displayName = SelectPrimitive.Content.displayName; + + + {children} + + + + + ); +} -const SelectLabel = React.forwardRef(({ className, ...props }, ref) => ( - -)); -SelectLabel.displayName = SelectPrimitive.Label.displayName; +function SelectLabel({ className, ref, ...props }) { + return ( + + ); +} -const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => ( - - - - - - - {children} - -)); -SelectItem.displayName = SelectPrimitive.Item.displayName; +function SelectItem({ className, children, ref, ...props }) { + return ( + + + + + + + {children} + + ); +} -const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => ( - -)); -SelectSeparator.displayName = SelectPrimitive.Separator.displayName; +function SelectSeparator({ className, ref, ...props }) { + return ( + + ); +} export { Select, diff --git a/client/components/ui/separator.jsx b/client/components/ui/separator.jsx index d464bd7..ffde22e 100644 --- a/client/components/ui/separator.jsx +++ b/client/components/ui/separator.jsx @@ -1,9 +1,8 @@ -import * as React from 'react'; import * as SeparatorPrimitive from '@radix-ui/react-separator'; import { cn } from '@/lib/utils'; -const Separator = React.forwardRef( - ({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => ( +function Separator({ className, orientation = 'horizontal', decorative = true, ref, ...props }) { + return ( - ) -); -Separator.displayName = SeparatorPrimitive.Root.displayName; + ); +} export { Separator }; diff --git a/client/components/ui/table.jsx b/client/components/ui/table.jsx index c52fa7a..5539af1 100644 --- a/client/components/ui/table.jsx +++ b/client/components/ui/table.jsx @@ -1,116 +1,122 @@ - -import * as React from 'react'; import { cn } from '@/lib/utils'; -const Table = React.forwardRef(({ className, ...props }, ref) => ( -
- +
+ + ); +} + +function TableHeader({ className, ref, ...props }) { + return ( + - -)); -Table.displayName = 'Table'; + ); +} -const TableHeader = React.forwardRef(({ className, ...props }, ref) => ( - -)); -TableHeader.displayName = 'TableHeader'; +function TableBody({ className, ref, ...props }) { + return ( + + ); +} -const TableBody = React.forwardRef(({ className, ...props }, ref) => ( - -)); -TableBody.displayName = 'TableBody'; +function TableFooter({ className, ref, ...props }) { + return ( + tr]:last:border-b-0', + className + )} + {...props} + /> + ); +} -const TableFooter = React.forwardRef(({ className, ...props }, ref) => ( - tr]:last:border-b-0', - className - )} - {...props} - /> -)); -TableFooter.displayName = 'TableFooter'; +function TableRow({ className, ref, ...props }) { + return ( + + ); +} -const TableRow = React.forwardRef(({ className, ...props }, ref) => ( - -)); -TableRow.displayName = 'TableRow'; +function TableHead({ className, ref, ...props }) { + return ( +
[role=checkbox]]:translate-y-[2px]', + className + )} + {...props} + /> + ); +} -const TableHead = React.forwardRef(({ className, ...props }, ref) => ( - [role=checkbox]]:translate-y-[2px]', - className - )} - {...props} - /> -)); -TableHead.displayName = 'TableHead'; +function TableCell({ className, ref, ...props }) { + return ( + [role=checkbox]]:translate-y-[2px]', + className + )} + {...props} + /> + ); +} -const TableCell = React.forwardRef(({ className, ...props }, ref) => ( - [role=checkbox]]:translate-y-[2px]', - className - )} - {...props} - /> -)); -TableCell.displayName = 'TableCell'; - -const TableCaption = React.forwardRef(({ className, ...props }, ref) => ( -
-)); -TableCaption.displayName = 'TableCaption'; +function TableCaption({ className, ref, ...props }) { + return ( + + ); +} export { Table, diff --git a/client/components/ui/tabs.jsx b/client/components/ui/tabs.jsx index fe04f48..9ed0deb 100644 --- a/client/components/ui/tabs.jsx +++ b/client/components/ui/tabs.jsx @@ -1,43 +1,45 @@ -import * as React from 'react'; import * as TabsPrimitive from '@radix-ui/react-tabs'; import { cn } from '@/lib/utils'; const Tabs = TabsPrimitive.Root; -const TabsList = React.forwardRef(({ className, ...props }, ref) => ( - -)); -TabsList.displayName = TabsPrimitive.List.displayName; +function TabsList({ className, ref, ...props }) { + return ( + + ); +} -const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => ( - -)); -TabsTrigger.displayName = TabsPrimitive.Trigger.displayName; +function TabsTrigger({ className, ref, ...props }) { + return ( + + ); +} -const TabsContent = React.forwardRef(({ className, ...props }, ref) => ( - -)); -TabsContent.displayName = TabsPrimitive.Content.displayName; +function TabsContent({ className, ref, ...props }) { + return ( + + ); +} export { Tabs, TabsList, TabsTrigger, TabsContent }; diff --git a/client/components/ui/theme-toggle.jsx b/client/components/ui/theme-toggle.jsx index 8109d39..d10d3d6 100644 --- a/client/components/ui/theme-toggle.jsx +++ b/client/components/ui/theme-toggle.jsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import { Sun, Moon } from 'lucide-react'; import { cn } from '@/lib/utils'; @@ -9,39 +8,41 @@ import { useTheme } from '@/contexts/ThemeContext'; const DropdownMenu = DropdownMenuPrimitive.Root; const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; -const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 6, ...props }, ref) => ( - - + + + ); +} + +function DropdownMenuItem({ className, inset, ref, ...props }) { + return ( + - -)); -DropdownMenuContent.displayName = 'DropdownMenuContent'; - -const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => ( - -)); -DropdownMenuItem.displayName = 'DropdownMenuItem'; + ); +} /* ── Theme options config ───────────────────────────────────── */ diff --git a/client/components/ui/tooltip.jsx b/client/components/ui/tooltip.jsx index fa4c2d6..b16c921 100644 --- a/client/components/ui/tooltip.jsx +++ b/client/components/ui/tooltip.jsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import * as TooltipPrimitive from '@radix-ui/react-tooltip'; import { cn } from '@/lib/utils'; @@ -6,19 +5,20 @@ const TooltipProvider = TooltipPrimitive.Provider; const Tooltip = TooltipPrimitive.Root; const TooltipTrigger = TooltipPrimitive.Trigger; -const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => ( - - - -)); -TooltipContent.displayName = TooltipPrimitive.Content.displayName; +function TooltipContent({ className, sideOffset = 4, ref, ...props }) { + return ( + + + + ); +} export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };