Initial import of 1407 block sources under blocks/

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ar.badiei
2026-07-11 21:21:29 +03:30
co-authored by Cursor
commit 85836ef183
1412 changed files with 303567 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
import { DollarSign, ShoppingCart, TrendingUp, Users } from "lucide-react";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { cn } from "@/lib/utils";
const formatPrice = (value: number) =>
`${value.toLocaleString("fa-IR")} ریال`;
const formatChange = (value: number) =>
`${new Intl.NumberFormat("fa-IR", {
minimumFractionDigits: 1,
maximumFractionDigits: 1,
signDisplay: "exceptZero",
}).format(value)}٪`;
type IconType = "dollar" | "users" | "cart" | "trending";
interface StatsCard5Props {
title?: string;
value?: string;
subtitle?: string;
icon?: IconType;
className?: string;
}
const iconMap = {
dollar: DollarSign,
users: Users,
cart: ShoppingCart,
trending: TrendingUp,
};
const StatsCard5 = ({
title = "مجموع درآمد",
value = formatPrice(45231000),
subtitle = `${formatChange(20.1)} نسبت به ماه گذشته`,
icon = "dollar",
className,
}: StatsCard5Props) => {
const Icon = iconMap[icon];
return (
<Card dir="rtl" lang="fa" className={cn("w-full max-w-xs", className)}>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium text-muted-foreground">
{title}
</CardTitle>
<div className="rounded-md bg-primary/10 p-2">
<Icon className="size-4 text-primary" />
</div>
</CardHeader>
<CardContent>
<div className="text-3xl font-bold">{value}</div>
<p className="mt-1 text-sm text-muted-foreground">{subtitle}</p>
</CardContent>
</Card>
);
};
export { StatsCard5 };