diff --git a/inventory/src/components/dashboard/AcotTest.jsx b/inventory/src/components/dashboard/AcotTest.jsx index 8fa503f..7bba9c4 100644 --- a/inventory/src/components/dashboard/AcotTest.jsx +++ b/inventory/src/components/dashboard/AcotTest.jsx @@ -1,8 +1,8 @@ import React, { useState, useEffect } from "react"; import axios from "axios"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/dashboard/ui/card"; -import { Button } from "@/components/dashboard/ui/button"; -import { Alert, AlertDescription, AlertTitle } from "@/components/dashboard/ui/alert"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Loader2, AlertCircle, CheckCircle, RefreshCw } from "lucide-react"; const AcotTest = () => { diff --git a/inventory/src/components/dashboard/AircallDashboard.jsx b/inventory/src/components/dashboard/AircallDashboard.jsx index 2790994..e8146ae 100644 --- a/inventory/src/components/dashboard/AircallDashboard.jsx +++ b/inventory/src/components/dashboard/AircallDashboard.jsx @@ -6,16 +6,16 @@ import { CardHeader, CardTitle, CardDescription, -} from "@/components/dashboard/ui/card"; +} from "@/components/ui/card"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@/components/dashboard/ui/select"; -import { Alert, AlertDescription } from "@/components/dashboard/ui/alert"; -import { Skeleton } from "@/components/dashboard/ui/skeleton"; +} from "@/components/ui/select"; +import { Alert, AlertDescription } from "@/components/ui/alert"; +import { Skeleton } from "@/components/ui/skeleton"; import { Table, TableBody, @@ -23,7 +23,7 @@ import { TableHead, TableHeader, TableRow, -} from "@/components/dashboard/ui/table"; +} from "@/components/ui/table"; import { PhoneCall, PhoneMissed, @@ -37,15 +37,15 @@ import { Download, Search, } from "lucide-react"; -import { Button } from "@/components/dashboard/ui/button"; -import { Input } from "@/components/dashboard/ui/input"; -import { Progress } from "@/components/dashboard/ui/progress"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Progress } from "@/components/ui/progress"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, -} from "@/components/dashboard/ui/tooltip"; +} from "@/components/ui/tooltip"; import { LineChart, Line, diff --git a/inventory/src/components/dashboard/AnalyticsDashboard.jsx b/inventory/src/components/dashboard/AnalyticsDashboard.jsx index 9ee54bc..6c17b73 100644 --- a/inventory/src/components/dashboard/AnalyticsDashboard.jsx +++ b/inventory/src/components/dashboard/AnalyticsDashboard.jsx @@ -1,14 +1,14 @@ import React, { useState, useEffect } from "react"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/dashboard/ui/card"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@/components/dashboard/ui/select"; -import { Button } from "@/components/dashboard/ui/button"; -import { Separator } from "@/components/dashboard/ui/separator"; +} from "@/components/ui/select"; +import { Button } from "@/components/ui/button"; +import { Separator } from "@/components/ui/separator"; import { LineChart, Line, @@ -21,10 +21,10 @@ import { ReferenceLine, } from "recharts"; import { Loader2, TrendingUp, AlertCircle } from "lucide-react"; -import { Alert, AlertDescription, AlertTitle } from "@/components/dashboard/ui/alert"; -import { Skeleton } from "@/components/dashboard/ui/skeleton"; -import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/dashboard/ui/dialog"; -import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/dashboard/ui/table"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { Skeleton } from "@/components/ui/skeleton"; +import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; // Add helper function for currency formatting const formatCurrency = (value, useFractionDigits = true) => { diff --git a/inventory/src/components/dashboard/DateTime.jsx b/inventory/src/components/dashboard/DateTime.jsx index e5cd1cc..ffc07c8 100644 --- a/inventory/src/components/dashboard/DateTime.jsx +++ b/inventory/src/components/dashboard/DateTime.jsx @@ -1,8 +1,8 @@ import React, { useState, useEffect } from 'react'; -import { Card, CardContent } from '@/components/dashboard/ui/card'; -import { Calendar as CalendarComponent } from '@/components/dashboard/ui/calendaredit'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/dashboard/ui/popover'; -import { Alert, AlertDescription } from '@/components/dashboard/ui/alert'; +import { Card, CardContent } from '@/components/ui/card'; +import { Calendar as CalendarComponent } from '@/components/ui/calendaredit'; +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; +import { Alert, AlertDescription } from '@/components/ui/alert'; import { Sun, Cloud, diff --git a/inventory/src/components/dashboard/EventFeed.jsx b/inventory/src/components/dashboard/EventFeed.jsx index 1d2211c..8a1f125 100644 --- a/inventory/src/components/dashboard/EventFeed.jsx +++ b/inventory/src/components/dashboard/EventFeed.jsx @@ -6,9 +6,9 @@ import { CardDescription, CardHeader, CardTitle, -} from "@/components/dashboard/ui/card"; -import { Badge } from "@/components/dashboard/ui/badge"; -import { ScrollArea } from "@/components/dashboard/ui/scroll-area"; +} from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { ScrollArea } from "@/components/ui/scroll-area"; import { Package, Truck, @@ -31,24 +31,24 @@ import { DialogHeader, DialogTitle, DialogTrigger, -} from "@/components/dashboard/ui/dialog"; +} from "@/components/ui/dialog"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@/components/dashboard/ui/select"; -import { Skeleton } from "@/components/dashboard/ui/skeleton"; -import { Button } from "@/components/dashboard/ui/button"; -import { Separator } from "@/components/dashboard/ui/separator"; +} from "@/components/ui/select"; +import { Skeleton } from "@/components/ui/skeleton"; +import { Button } from "@/components/ui/button"; +import { Separator } from "@/components/ui/separator"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, -} from "@/components/dashboard/ui/tooltip"; -import { Alert, AlertDescription, AlertTitle } from "@/components/dashboard/ui/alert"; +} from "@/components/ui/tooltip"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; const METRIC_IDS = { PLACED_ORDER: "Y8cqcF", diff --git a/inventory/src/components/dashboard/FinancialOverview.tsx b/inventory/src/components/dashboard/FinancialOverview.tsx index 5a5fd7d..86c65a5 100644 --- a/inventory/src/components/dashboard/FinancialOverview.tsx +++ b/inventory/src/components/dashboard/FinancialOverview.tsx @@ -6,15 +6,15 @@ import { CardDescription, CardHeader, CardTitle, -} from "@/components/dashboard/ui/card"; -import { Button } from "@/components/dashboard/ui/button"; +} from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@/components/dashboard/ui/select"; +} from "@/components/ui/select"; import { Dialog, DialogContent, @@ -22,8 +22,8 @@ import { DialogHeader, DialogTitle, DialogTrigger, -} from "@/components/dashboard/ui/dialog"; -import { Separator } from "@/components/dashboard/ui/separator"; +} from "@/components/ui/dialog"; +import { Separator } from "@/components/ui/separator"; import { Table, TableBody, @@ -31,7 +31,7 @@ import { TableHead, TableHeader, TableRow, -} from "@/components/dashboard/ui/table"; +} from "@/components/ui/table"; import { Area, CartesianGrid, @@ -44,8 +44,8 @@ import { YAxis, } from "recharts"; import type { TooltipProps } from "recharts"; -import { Alert, AlertDescription, AlertTitle } from "@/components/dashboard/ui/alert"; -import { Skeleton } from "@/components/dashboard/ui/skeleton"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { Skeleton } from "@/components/ui/skeleton"; import { ArrowUpRight, ArrowDownRight, Minus, TrendingUp, AlertCircle } from "lucide-react"; type TrendDirection = "up" | "down" | "flat"; @@ -1510,7 +1510,7 @@ function FinancialStatGrid({ return (
{cards.map((card) => ( - + ))}
); diff --git a/inventory/src/components/dashboard/GorgiasOverview.jsx b/inventory/src/components/dashboard/GorgiasOverview.jsx index 4fa0f9b..482b193 100644 --- a/inventory/src/components/dashboard/GorgiasOverview.jsx +++ b/inventory/src/components/dashboard/GorgiasOverview.jsx @@ -1,12 +1,12 @@ import React, { useState, useEffect, useCallback } from "react"; -import { Card, CardContent, CardHeader } from "@/components/dashboard/ui/card"; +import { Card, CardContent, CardHeader } from "@/components/ui/card"; import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue, -} from "@/components/dashboard/ui/select"; +} from "@/components/ui/select"; import { Table, TableBody, @@ -14,8 +14,8 @@ import { TableHead, TableHeader, TableRow, -} from "@/components/dashboard/ui/table"; -import { Skeleton } from "@/components/dashboard/ui/skeleton"; +} from "@/components/ui/table"; +import { Skeleton } from "@/components/ui/skeleton"; import { Clock, Star, diff --git a/inventory/src/components/dashboard/Header.jsx b/inventory/src/components/dashboard/Header.jsx index f3386f1..bf21646 100644 --- a/inventory/src/components/dashboard/Header.jsx +++ b/inventory/src/components/dashboard/Header.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from "react"; -import { Card, CardContent } from "@/components/dashboard/ui/card"; +import { Card, CardContent } from "@/components/ui/card"; import { Calendar, Clock, @@ -33,13 +33,13 @@ import { TooltipContent, TooltipProvider, TooltipTrigger, -} from "@/components/dashboard/ui/tooltip"; +} from "@/components/ui/tooltip"; import { Popover, PopoverContent, PopoverTrigger, -} from "@/components/dashboard/ui/popover"; -import { Alert, AlertDescription } from "@/components/dashboard/ui/alert"; +} from "@/components/ui/popover"; +import { Alert, AlertDescription } from "@/components/ui/alert"; const CraftsIcon = () => (
-)) -Alert.displayName = "Alert" - -const AlertTitle = React.forwardRef(({ className, ...props }, ref) => ( -
-)) -AlertTitle.displayName = "AlertTitle" - -const AlertDescription = React.forwardRef(({ className, ...props }, ref) => ( -
-)) -AlertDescription.displayName = "AlertDescription" - -export { Alert, AlertTitle, AlertDescription } diff --git a/inventory/src/components/dashboard/ui/badge.jsx b/inventory/src/components/dashboard/ui/badge.jsx deleted file mode 100644 index a687eba..0000000 --- a/inventory/src/components/dashboard/ui/badge.jsx +++ /dev/null @@ -1,34 +0,0 @@ -import * as React from "react" -import { cva } from "class-variance-authority"; - -import { cn } from "@/lib/utils" - -const badgeVariants = cva( - "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", - { - variants: { - variant: { - default: - "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80", - secondary: - "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", - destructive: - "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80", - outline: "text-foreground", - }, - }, - defaultVariants: { - variant: "default", - }, - } -) - -function Badge({ - className, - variant, - ...props -}) { - return (
); -} - -export { Badge, badgeVariants } diff --git a/inventory/src/components/dashboard/ui/button.jsx b/inventory/src/components/dashboard/ui/button.jsx deleted file mode 100644 index bf3d2ef..0000000 --- a/inventory/src/components/dashboard/ui/button.jsx +++ /dev/null @@ -1,48 +0,0 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva } from "class-variance-authority"; - -import { cn } from "@/lib/utils" - -const buttonVariants = cva( - "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", - { - variants: { - variant: { - default: - "bg-primary text-primary-foreground shadow hover:bg-primary/90", - destructive: - "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", - outline: - "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground", - secondary: - "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", - ghost: "hover:bg-accent hover:text-accent-foreground", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: "h-9 px-4 py-2", - sm: "h-8 rounded-md px-3 text-xs", - lg: "h-10 rounded-md px-8", - icon: "h-9 w-9", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, - } -) - -const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button" - return ( - () - ); -}) -Button.displayName = "Button" - -export { Button, buttonVariants } diff --git a/inventory/src/components/dashboard/ui/calendar.jsx b/inventory/src/components/dashboard/ui/calendar.jsx deleted file mode 100644 index 43a2a7e..0000000 --- a/inventory/src/components/dashboard/ui/calendar.jsx +++ /dev/null @@ -1,67 +0,0 @@ -import * as React from "react" -import { ChevronLeft, ChevronRight } from "lucide-react" -import { DayPicker } from "react-day-picker" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/dashboard/ui/button" - -function Calendar({ - className, - classNames, - showOutsideDays = true, - ...props -}) { - return ( - (.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" - : "[&:has([aria-selected])]:rounded-md" - ), - day: cn( - buttonVariants({ variant: "ghost" }), - "h-8 w-8 p-0 font-normal aria-selected:opacity-100" - ), - day_range_start: "day-range-start", - day_range_end: "day-range-end", - day_selected: - "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground", - day_today: "bg-accent text-accent-foreground", - day_outside: - "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground", - day_disabled: "text-muted-foreground opacity-50", - day_range_middle: - "aria-selected:bg-accent aria-selected:text-accent-foreground", - day_hidden: "invisible", - ...classNames, - }} - components={{ - IconLeft: ({ ...props }) => , - IconRight: ({ ...props }) => , - }} - {...props} />) - ); -} -Calendar.displayName = "Calendar" - -export { Calendar } diff --git a/inventory/src/components/dashboard/ui/calendaredit.jsx b/inventory/src/components/dashboard/ui/calendaredit.jsx deleted file mode 100644 index 39645b8..0000000 --- a/inventory/src/components/dashboard/ui/calendaredit.jsx +++ /dev/null @@ -1,66 +0,0 @@ -import * as React from "react" -import { ChevronLeft, ChevronRight } from "lucide-react" -import { DayPicker } from "react-day-picker" -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/dashboard/ui/button" - -function Calendar({ - className, - classNames, - showOutsideDays = true, - ...props -}) { - return ( - .day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" - : "[&:has([aria-selected])]:rounded-md" - ), - day: cn( - buttonVariants({ variant: "ghost" }), - "h-6 w-6 p-0 font-normal text-xs aria-selected:opacity-100" // Reduced from h-12 w-12 and text-lg - ), - day_range_start: "day-range-start", - day_range_end: "day-range-end", - day_selected: - "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground", - day_today: "bg-accent text-accent-foreground", - day_outside: - "day-outside text-muted-foreground/50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground", - day_disabled: "text-muted-foreground opacity-50", - day_range_middle: - "aria-selected:bg-accent aria-selected:text-accent-foreground", - day_hidden: "invisible", - ...classNames, - }} - components={{ - IconLeft: ({ ...props }) => , - IconRight: ({ ...props }) => , - }} - {...props} - /> - ); -} - -Calendar.displayName = "Calendar" -export { Calendar } \ No newline at end of file diff --git a/inventory/src/components/dashboard/ui/card.jsx b/inventory/src/components/dashboard/ui/card.jsx deleted file mode 100644 index 2985cca..0000000 --- a/inventory/src/components/dashboard/ui/card.jsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from "react" - -import { cn } from "@/lib/utils" - -const Card = React.forwardRef(({ className, ...props }, ref) => ( -
-)) -Card.displayName = "Card" - -const CardHeader = React.forwardRef(({ className, ...props }, ref) => ( -
-)) -CardHeader.displayName = "CardHeader" - -const CardTitle = React.forwardRef(({ className, ...props }, ref) => ( -
-)) -CardTitle.displayName = "CardTitle" - -const CardDescription = React.forwardRef(({ className, ...props }, ref) => ( -
-)) -CardDescription.displayName = "CardDescription" - -const CardContent = React.forwardRef(({ className, ...props }, ref) => ( -
-)) -CardContent.displayName = "CardContent" - -const CardFooter = React.forwardRef(({ className, ...props }, ref) => ( -
-)) -CardFooter.displayName = "CardFooter" - -export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } diff --git a/inventory/src/components/dashboard/ui/chart.jsx b/inventory/src/components/dashboard/ui/chart.jsx deleted file mode 100644 index 7a16db9..0000000 --- a/inventory/src/components/dashboard/ui/chart.jsx +++ /dev/null @@ -1,308 +0,0 @@ -import * as React from "react" -import * as RechartsPrimitive from "recharts" - -import { cn } from "@/lib/utils" - -// Format: { THEME_NAME: CSS_SELECTOR } -const THEMES = { - light: "", - dark: ".dark" -} - -const ChartContext = React.createContext(null) - -function useChart() { - const context = React.useContext(ChartContext) - - if (!context) { - throw new Error("useChart must be used within a ") - } - - return context -} - -const ChartContainer = React.forwardRef(({ id, className, children, config, ...props }, ref) => { - const uniqueId = React.useId() - const chartId = `chart-${id || uniqueId.replace(/:/g, "")}` - - return ( - ( -
- - - {children} - -
-
) - ); -}) -ChartContainer.displayName = "Chart" - -const ChartStyle = ({ - id, - config -}) => { - const colorConfig = Object.entries(config).filter(([_, config]) => config.theme || config.color) - - if (!colorConfig.length) { - return null - } - - return ( - (