mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-11 09:51:40 +00:00
feat: e-commerce dashboard blocks (#3236)
* feat(blocks): add e-commerce dashboard * feat(blocks): add products pages * style(blocks): run prettier * feat(www): update dashboard-05 * feat(www): update gap for dashboard-05 * feat(www): update dashboards * fix(www): review a11y for new blocks * fix(blocks): a11y for dashboard-07 * fix(www): blocks background * chore: update registry
This commit is contained in:
@@ -1697,6 +1697,33 @@ export const Index: Record<string, any> = {
|
|||||||
category: "undefined",
|
category: "undefined",
|
||||||
subcategory: "undefined",
|
subcategory: "undefined",
|
||||||
},
|
},
|
||||||
|
"dashboard-05": {
|
||||||
|
name: "dashboard-05",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: ["badge","breadcrumb","button","card","dropdown-menu","input","pagination","progress","separator","sheet","table","tabs","tooltip"],
|
||||||
|
component: React.lazy(() => import("@/registry/default/block/dashboard-05")),
|
||||||
|
files: ["registry/default/block/dashboard-05.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
|
"dashboard-06": {
|
||||||
|
name: "dashboard-06",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: ["badge","breadcrumb","button","card","dropdown-menu","input","sheet","table","tabs","tooltip"],
|
||||||
|
component: React.lazy(() => import("@/registry/default/block/dashboard-06")),
|
||||||
|
files: ["registry/default/block/dashboard-06.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
|
"dashboard-07": {
|
||||||
|
name: "dashboard-07",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: ["badge","breadcrumb","button","card","dropdown-menu","input","pagination","progress","separator","sheet","table","tabs","tooltip"],
|
||||||
|
component: React.lazy(() => import("@/registry/default/block/dashboard-07")),
|
||||||
|
files: ["registry/default/block/dashboard-07.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
"dashboard-01": {
|
"dashboard-01": {
|
||||||
name: "dashboard-01",
|
name: "dashboard-01",
|
||||||
type: "components:block",
|
type: "components:block",
|
||||||
@@ -3462,6 +3489,33 @@ export const Index: Record<string, any> = {
|
|||||||
category: "undefined",
|
category: "undefined",
|
||||||
subcategory: "undefined",
|
subcategory: "undefined",
|
||||||
},
|
},
|
||||||
|
"dashboard-05": {
|
||||||
|
name: "dashboard-05",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: ["badge","breadcrumb","button","card","dropdown-menu","input","pagination","progress","separator","sheet","table","tabs","tooltip"],
|
||||||
|
component: React.lazy(() => import("@/registry/new-york/block/dashboard-05")),
|
||||||
|
files: ["registry/new-york/block/dashboard-05.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
|
"dashboard-06": {
|
||||||
|
name: "dashboard-06",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: ["badge","breadcrumb","button","card","dropdown-menu","input","sheet","table","tabs","tooltip"],
|
||||||
|
component: React.lazy(() => import("@/registry/new-york/block/dashboard-06")),
|
||||||
|
files: ["registry/new-york/block/dashboard-06.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
|
"dashboard-07": {
|
||||||
|
name: "dashboard-07",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: ["badge","breadcrumb","button","card","dropdown-menu","input","pagination","progress","separator","sheet","table","tabs","tooltip"],
|
||||||
|
component: React.lazy(() => import("@/registry/new-york/block/dashboard-07")),
|
||||||
|
files: ["registry/new-york/block/dashboard-07.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
"dashboard-01": {
|
"dashboard-01": {
|
||||||
name: "dashboard-01",
|
name: "dashboard-01",
|
||||||
type: "components:block",
|
type: "components:block",
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
|
import { Metadata } from "next"
|
||||||
|
import { notFound } from "next/navigation"
|
||||||
|
|
||||||
import { siteConfig } from "@/config/site"
|
import { siteConfig } from "@/config/site"
|
||||||
import { getAllBlockIds, getBlock } from "@/lib/blocks"
|
import { getAllBlockIds, getBlock } from "@/lib/blocks"
|
||||||
import { absoluteUrl } from "@/lib/utils"
|
import { absoluteUrl, cn } from "@/lib/utils"
|
||||||
import { Style, styles } from "@/registry/styles"
|
import { Style, styles } from "@/registry/styles"
|
||||||
|
|
||||||
import "@/styles/mdx.css"
|
import "@/styles/mdx.css"
|
||||||
import { Metadata } from "next"
|
import "public/registry/themes.css"
|
||||||
import { notFound } from "next/navigation"
|
|
||||||
|
|
||||||
export async function generateMetadata({
|
export async function generateMetadata({
|
||||||
params,
|
params,
|
||||||
@@ -79,7 +81,7 @@ export default async function BlockPage({
|
|||||||
const Component = block.component
|
const Component = block.component
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={block.container?.className || ""}>
|
<div className={cn(block.container?.className || "", "theme-zinc")}>
|
||||||
<Component />
|
<Component />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export function BlockPreview({ block }: { block: Block }) {
|
|||||||
>
|
>
|
||||||
<div className="flex flex-col items-center gap-4 sm:flex-row">
|
<div className="flex flex-col items-center gap-4 sm:flex-row">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<TabsList className="hidden sm:flex">
|
<TabsList className="hidden h-8 sm:flex">
|
||||||
<TabsTrigger value="preview">Preview</TabsTrigger>
|
<TabsTrigger value="preview">Preview</TabsTrigger>
|
||||||
<TabsTrigger value="code">Code</TabsTrigger>
|
<TabsTrigger value="code">Code</TabsTrigger>
|
||||||
</TabsList>
|
</TabsList>
|
||||||
@@ -75,19 +75,6 @@ export function BlockPreview({ block }: { block: Block }) {
|
|||||||
<a href={`#${block.name}`}>
|
<a href={`#${block.name}`}>
|
||||||
<Badge variant="outline">{block.name}</Badge>
|
<Badge variant="outline">{block.name}</Badge>
|
||||||
</a>
|
</a>
|
||||||
<Popover>
|
|
||||||
<PopoverTrigger className="hidden text-muted-foreground hover:text-foreground sm:flex">
|
|
||||||
<Info className="h-3.5 w-3.5" />
|
|
||||||
<span className="sr-only">Block description</span>
|
|
||||||
</PopoverTrigger>
|
|
||||||
<PopoverContent
|
|
||||||
side="right"
|
|
||||||
sideOffset={10}
|
|
||||||
className="text-sm"
|
|
||||||
>
|
|
||||||
{block.description}
|
|
||||||
</PopoverContent>
|
|
||||||
</Popover>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -116,7 +103,7 @@ export function BlockPreview({ block }: { block: Block }) {
|
|||||||
<Tablet className="h-3.5 w-3.5" />
|
<Tablet className="h-3.5 w-3.5" />
|
||||||
</ToggleGroupItem>
|
</ToggleGroupItem>
|
||||||
<ToggleGroupItem
|
<ToggleGroupItem
|
||||||
value="25"
|
value="30"
|
||||||
className="h-[22px] w-[22px] rounded-sm p-0"
|
className="h-[22px] w-[22px] rounded-sm p-0"
|
||||||
>
|
>
|
||||||
<Smartphone className="h-3.5 w-3.5" />
|
<Smartphone className="h-3.5 w-3.5" />
|
||||||
@@ -177,7 +164,7 @@ export function BlockPreview({ block }: { block: Block }) {
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
className="relative rounded-lg border bg-background transition-all"
|
className="relative rounded-lg border bg-background transition-all"
|
||||||
defaultSize={100}
|
defaultSize={100}
|
||||||
minSize={25}
|
minSize={30}
|
||||||
>
|
>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<div className="absolute inset-0 z-10 flex h-[--container-height] w-full items-center justify-center gap-2 text-sm text-muted-foreground">
|
<div className="absolute inset-0 z-10 flex h-[--container-height] w-full items-center justify-center gap-2 text-sm text-muted-foreground">
|
||||||
|
|||||||
@@ -1,6 +1,69 @@
|
|||||||
import { Registry } from "@/registry/schema"
|
import { Registry } from "@/registry/schema"
|
||||||
|
|
||||||
export const blocks: Registry = [
|
export const blocks: Registry = [
|
||||||
|
{
|
||||||
|
name: "dashboard-05",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: [
|
||||||
|
"badge",
|
||||||
|
"breadcrumb",
|
||||||
|
"button",
|
||||||
|
"card",
|
||||||
|
"dropdown-menu",
|
||||||
|
"input",
|
||||||
|
"pagination",
|
||||||
|
"progress",
|
||||||
|
"separator",
|
||||||
|
"sheet",
|
||||||
|
"table",
|
||||||
|
"tabs",
|
||||||
|
"tooltip",
|
||||||
|
],
|
||||||
|
files: ["block/dashboard-05.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dashboard-06",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: [
|
||||||
|
"badge",
|
||||||
|
"breadcrumb",
|
||||||
|
"button",
|
||||||
|
"card",
|
||||||
|
"dropdown-menu",
|
||||||
|
"input",
|
||||||
|
"sheet",
|
||||||
|
"table",
|
||||||
|
"tabs",
|
||||||
|
"tooltip",
|
||||||
|
],
|
||||||
|
files: ["block/dashboard-06.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dashboard-07",
|
||||||
|
type: "components:block",
|
||||||
|
registryDependencies: [
|
||||||
|
"badge",
|
||||||
|
"breadcrumb",
|
||||||
|
"button",
|
||||||
|
"card",
|
||||||
|
"dropdown-menu",
|
||||||
|
"input",
|
||||||
|
"pagination",
|
||||||
|
"progress",
|
||||||
|
"separator",
|
||||||
|
"sheet",
|
||||||
|
"table",
|
||||||
|
"tabs",
|
||||||
|
"tooltip",
|
||||||
|
],
|
||||||
|
files: ["block/dashboard-07.tsx"],
|
||||||
|
category: "Application",
|
||||||
|
subcategory: "Dashboard",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "dashboard-01",
|
name: "dashboard-01",
|
||||||
type: "components:block",
|
type: "components:block",
|
||||||
|
|||||||
720
apps/www/registry/default/block/dashboard-05.tsx
Normal file
720
apps/www/registry/default/block/dashboard-05.tsx
Normal file
@@ -0,0 +1,720 @@
|
|||||||
|
import Image from "next/image"
|
||||||
|
import Link from "next/link"
|
||||||
|
import {
|
||||||
|
ChevronLeft,
|
||||||
|
ChevronRight,
|
||||||
|
Copy,
|
||||||
|
CreditCard,
|
||||||
|
File,
|
||||||
|
Home,
|
||||||
|
LineChart,
|
||||||
|
ListFilter,
|
||||||
|
MoreVertical,
|
||||||
|
Package,
|
||||||
|
Package2,
|
||||||
|
PanelLeft,
|
||||||
|
Search,
|
||||||
|
Settings,
|
||||||
|
ShoppingCart,
|
||||||
|
Truck,
|
||||||
|
Users2,
|
||||||
|
} from "lucide-react"
|
||||||
|
|
||||||
|
import { Badge } from "@/registry/default/ui/badge"
|
||||||
|
import {
|
||||||
|
Breadcrumb,
|
||||||
|
BreadcrumbItem,
|
||||||
|
BreadcrumbLink,
|
||||||
|
BreadcrumbList,
|
||||||
|
BreadcrumbPage,
|
||||||
|
BreadcrumbSeparator,
|
||||||
|
} from "@/registry/default/ui/breadcrumb"
|
||||||
|
import { Button } from "@/registry/default/ui/button"
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/registry/default/ui/card"
|
||||||
|
import {
|
||||||
|
DropdownMenu,
|
||||||
|
DropdownMenuCheckboxItem,
|
||||||
|
DropdownMenuContent,
|
||||||
|
DropdownMenuItem,
|
||||||
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
|
DropdownMenuTrigger,
|
||||||
|
} from "@/registry/default/ui/dropdown-menu"
|
||||||
|
import { Input } from "@/registry/default/ui/input"
|
||||||
|
import {
|
||||||
|
Pagination,
|
||||||
|
PaginationContent,
|
||||||
|
PaginationItem,
|
||||||
|
} from "@/registry/default/ui/pagination"
|
||||||
|
import { Progress } from "@/registry/default/ui/progress"
|
||||||
|
import { Separator } from "@/registry/default/ui/separator"
|
||||||
|
import { Sheet, SheetContent, SheetTrigger } from "@/registry/default/ui/sheet"
|
||||||
|
import {
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableHead,
|
||||||
|
TableHeader,
|
||||||
|
TableRow,
|
||||||
|
} from "@/registry/default/ui/table"
|
||||||
|
import {
|
||||||
|
Tabs,
|
||||||
|
TabsContent,
|
||||||
|
TabsList,
|
||||||
|
TabsTrigger,
|
||||||
|
} from "@/registry/default/ui/tabs"
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/registry/default/ui/tooltip"
|
||||||
|
|
||||||
|
export const description =
|
||||||
|
"An orders dashboard with a sidebar navigation. The sidebar has icon navigation. The content area has a breadcrumb and search in the header. The main area has a list of recent orders with a filter and export button. The main area also has a detailed view of a single order with order details, shipping information, billing information, customer information, and payment information."
|
||||||
|
|
||||||
|
export const iframeHeight = "1112px"
|
||||||
|
|
||||||
|
export const containerClassName = "w-full h-full"
|
||||||
|
|
||||||
|
export default function Dashboard() {
|
||||||
|
return (
|
||||||
|
<div className="flex min-h-screen w-full flex-col bg-muted/40">
|
||||||
|
<aside className="fixed inset-y-0 left-0 z-10 hidden w-14 flex-col border-r bg-background sm:flex">
|
||||||
|
<nav className="flex flex-col items-center gap-4 px-2 sm:py-5">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-9 w-9 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:h-8 md:w-8 md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-4 w-4 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Dashboard</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg bg-accent text-accent-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Orders</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Orders</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Products</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Products</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Customers</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Customers</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Analytics</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Analytics</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
<nav className="mt-auto flex flex-col items-center gap-4 px-2 sm:py-5">
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Settings className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Settings</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Settings</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
<div className="flex flex-col sm:gap-4 sm:py-4 sm:pl-14">
|
||||||
|
<header className="sticky top-0 z-30 flex h-14 items-center gap-4 border-b bg-background px-4 sm:static sm:h-auto sm:border-0 sm:bg-transparent sm:px-6">
|
||||||
|
<Sheet>
|
||||||
|
<SheetTrigger asChild>
|
||||||
|
<Button size="icon" variant="outline" className="sm:hidden">
|
||||||
|
<PanelLeft className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Toggle Menu</span>
|
||||||
|
</Button>
|
||||||
|
</SheetTrigger>
|
||||||
|
<SheetContent side="left" className="sm:max-w-xs">
|
||||||
|
<nav className="grid gap-6 text-lg font-medium">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-10 w-10 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-5 w-5 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
Dashboard
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-foreground"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
Orders
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
Products
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
Customers
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
Settings
|
||||||
|
</Link>
|
||||||
|
</nav>
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
|
<Breadcrumb className="hidden md:flex">
|
||||||
|
<BreadcrumbList>
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Dashboard</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Orders</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbPage>Recent Orders</BreadcrumbPage>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
</BreadcrumbList>
|
||||||
|
</Breadcrumb>
|
||||||
|
<div className="relative ml-auto flex-1 md:grow-0">
|
||||||
|
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
|
||||||
|
<Input
|
||||||
|
type="search"
|
||||||
|
placeholder="Search..."
|
||||||
|
className="w-full rounded-lg bg-background pl-8 md:w-[200px] lg:w-[336px]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="icon"
|
||||||
|
className="overflow-hidden rounded-full"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/placeholder-user.jpg"
|
||||||
|
width={36}
|
||||||
|
height={36}
|
||||||
|
alt="Avatar"
|
||||||
|
className="overflow-hidden"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Settings</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Support</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Logout</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</header>
|
||||||
|
<main className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-8 lg:grid-cols-3 xl:grid-cols-3">
|
||||||
|
<div className="grid auto-rows-max items-start gap-4 md:gap-8 lg:col-span-2">
|
||||||
|
<div className="grid gap-4 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-2 xl:grid-cols-4">
|
||||||
|
<Card className="sm:col-span-2">
|
||||||
|
<CardHeader className="pb-3">
|
||||||
|
<CardTitle>Your Orders</CardTitle>
|
||||||
|
<CardDescription className="max-w-lg text-balance leading-relaxed">
|
||||||
|
Introducing Our Dynamic Orders Dashboard for Seamless
|
||||||
|
Management and Insightful Analysis.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardFooter>
|
||||||
|
<Button>Create New Order</Button>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader className="pb-2">
|
||||||
|
<CardDescription>This Week</CardDescription>
|
||||||
|
<CardTitle className="text-4xl">$1329</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
+25% from last week
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<Progress value={25} aria-label="25% increase" />
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader className="pb-2">
|
||||||
|
<CardDescription>This Month</CardDescription>
|
||||||
|
<CardTitle className="text-3xl">$5,329</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
+10% from last month
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<Progress value={12} aria-label="12% increase" />
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
<Tabs defaultValue="week">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<TabsList>
|
||||||
|
<TabsTrigger value="week">Week</TabsTrigger>
|
||||||
|
<TabsTrigger value="month">Month</TabsTrigger>
|
||||||
|
<TabsTrigger value="year">Year</TabsTrigger>
|
||||||
|
</TabsList>
|
||||||
|
<div className="ml-auto flex items-center gap-2">
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="sm"
|
||||||
|
className="h-7 gap-1 text-sm"
|
||||||
|
>
|
||||||
|
<ListFilter className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only">Filter</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Filter by</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuCheckboxItem checked>
|
||||||
|
Fulfilled
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
<DropdownMenuCheckboxItem>
|
||||||
|
Declined
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
<DropdownMenuCheckboxItem>
|
||||||
|
Refunded
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
<Button
|
||||||
|
size="sm"
|
||||||
|
variant="outline"
|
||||||
|
className="h-7 gap-1 text-sm"
|
||||||
|
>
|
||||||
|
<File className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only">Export</span>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<TabsContent value="week">
|
||||||
|
<Card>
|
||||||
|
<CardHeader className="px-7">
|
||||||
|
<CardTitle>Orders</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Recent orders from your store.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<Table>
|
||||||
|
<TableHeader>
|
||||||
|
<TableRow>
|
||||||
|
<TableHead>Customer</TableHead>
|
||||||
|
<TableHead className="hidden sm:table-cell">
|
||||||
|
Type
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="hidden sm:table-cell">
|
||||||
|
Status
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="hidden md:table-cell">
|
||||||
|
Date
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="text-right">Amount</TableHead>
|
||||||
|
</TableRow>
|
||||||
|
</TableHeader>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow className="bg-accent">
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Liam Johnson</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
liam@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-23
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$250.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Olivia Smith</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
olivia@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Refund
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="outline">
|
||||||
|
Declined
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-24
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$150.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Noah Williams</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
noah@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Subscription
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-25
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$350.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Emma Brown</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
emma@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-26
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$450.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Liam Johnson</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
liam@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-23
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$250.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Liam Johnson</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
liam@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-23
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$250.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Olivia Smith</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
olivia@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Refund
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="outline">
|
||||||
|
Declined
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-24
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$150.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Emma Brown</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
emma@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-26
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$450.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</TabsContent>
|
||||||
|
</Tabs>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Card className="overflow-hidden">
|
||||||
|
<CardHeader className="flex flex-row items-start bg-muted/50">
|
||||||
|
<div className="grid gap-0.5">
|
||||||
|
<CardTitle className="group flex items-center gap-2 text-lg">
|
||||||
|
Order ID: Oe31b70H
|
||||||
|
<Button
|
||||||
|
size="icon"
|
||||||
|
variant="outline"
|
||||||
|
className="h-6 w-6 opacity-0 transition-opacity group-hover:opacity-100"
|
||||||
|
>
|
||||||
|
<Copy className="h-3 w-3" />
|
||||||
|
<span className="sr-only">Copy Order ID</span>
|
||||||
|
</Button>
|
||||||
|
</CardTitle>
|
||||||
|
<CardDescription>Date: November 23, 2023</CardDescription>
|
||||||
|
</div>
|
||||||
|
<div className="ml-auto flex items-center gap-1">
|
||||||
|
<Button size="sm" variant="outline" className="h-8 gap-1">
|
||||||
|
<Truck className="h-3.5 w-3.5" />
|
||||||
|
<span className="lg:sr-only xl:not-sr-only xl:whitespace-nowrap">
|
||||||
|
Track Order
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button size="icon" variant="outline" className="h-8 w-8">
|
||||||
|
<MoreVertical className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only">More</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Export</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Trash</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</div>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="p-6 text-sm">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<div className="font-semibold">Order Details</div>
|
||||||
|
<ul className="grid gap-3">
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">
|
||||||
|
Glimmer Lamps x <span>2</span>
|
||||||
|
</span>
|
||||||
|
<span>$250.00</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">
|
||||||
|
Aqua Filters x <span>1</span>
|
||||||
|
</span>
|
||||||
|
<span>$49.00</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<Separator className="my-2" />
|
||||||
|
<ul className="grid gap-3">
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">Subtotal</span>
|
||||||
|
<span>$299.00</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">Shipping</span>
|
||||||
|
<span>$5.00</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">Tax</span>
|
||||||
|
<span>$25.00</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center justify-between font-semibold">
|
||||||
|
<span className="text-muted-foreground">Total</span>
|
||||||
|
<span>$329.00</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<Separator className="my-4" />
|
||||||
|
<div className="grid grid-cols-2 gap-4">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<div className="font-semibold">Shipping Information</div>
|
||||||
|
<address className="grid gap-0.5 not-italic text-muted-foreground">
|
||||||
|
<span>Liam Johnson</span>
|
||||||
|
<span>1234 Main St.</span>
|
||||||
|
<span>Anytown, CA 12345</span>
|
||||||
|
</address>
|
||||||
|
</div>
|
||||||
|
<div className="grid auto-rows-max gap-3">
|
||||||
|
<div className="font-semibold">Billing Information</div>
|
||||||
|
<div className="text-muted-foreground">
|
||||||
|
Same as shipping address
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Separator className="my-4" />
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<div className="font-semibold">Customer Information</div>
|
||||||
|
<dl className="grid gap-3">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<dt className="text-muted-foreground">Customer</dt>
|
||||||
|
<dd>Liam Johnson</dd>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<dt className="text-muted-foreground">Email</dt>
|
||||||
|
<dd>
|
||||||
|
<a href="mailto:">liam@acme.com</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<dt className="text-muted-foreground">Phone</dt>
|
||||||
|
<dd>
|
||||||
|
<a href="tel:">+1 234 567 890</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<Separator className="my-4" />
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<div className="font-semibold">Payment Information</div>
|
||||||
|
<dl className="grid gap-3">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<dt className="flex items-center gap-1 text-muted-foreground">
|
||||||
|
<CreditCard className="h-4 w-4" />
|
||||||
|
Visa
|
||||||
|
</dt>
|
||||||
|
<dd>**** **** **** 4532</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter className="flex flex-row items-center border-t bg-muted/50 px-6 py-3">
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
Updated <time dateTime="2023-11-23">November 23, 2023</time>
|
||||||
|
</div>
|
||||||
|
<Pagination className="ml-auto mr-0 w-auto">
|
||||||
|
<PaginationContent>
|
||||||
|
<PaginationItem>
|
||||||
|
<Button size="icon" variant="outline" className="h-6 w-6">
|
||||||
|
<ChevronLeft className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only">Previous Order</span>
|
||||||
|
</Button>
|
||||||
|
</PaginationItem>
|
||||||
|
<PaginationItem>
|
||||||
|
<Button size="icon" variant="outline" className="h-6 w-6">
|
||||||
|
<ChevronRight className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only">Next Order</span>
|
||||||
|
</Button>
|
||||||
|
</PaginationItem>
|
||||||
|
</PaginationContent>
|
||||||
|
</Pagination>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
637
apps/www/registry/default/block/dashboard-06.tsx
Normal file
637
apps/www/registry/default/block/dashboard-06.tsx
Normal file
@@ -0,0 +1,637 @@
|
|||||||
|
import Image from "next/image"
|
||||||
|
import Link from "next/link"
|
||||||
|
import {
|
||||||
|
File,
|
||||||
|
Home,
|
||||||
|
LineChart,
|
||||||
|
ListFilter,
|
||||||
|
MoreHorizontal,
|
||||||
|
Package,
|
||||||
|
Package2,
|
||||||
|
PanelLeft,
|
||||||
|
PlusCircle,
|
||||||
|
Search,
|
||||||
|
Settings,
|
||||||
|
ShoppingCart,
|
||||||
|
Users2,
|
||||||
|
} from "lucide-react"
|
||||||
|
|
||||||
|
import { Badge } from "@/registry/default/ui/badge"
|
||||||
|
import {
|
||||||
|
Breadcrumb,
|
||||||
|
BreadcrumbItem,
|
||||||
|
BreadcrumbLink,
|
||||||
|
BreadcrumbList,
|
||||||
|
BreadcrumbPage,
|
||||||
|
BreadcrumbSeparator,
|
||||||
|
} from "@/registry/default/ui/breadcrumb"
|
||||||
|
import { Button } from "@/registry/default/ui/button"
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/registry/default/ui/card"
|
||||||
|
import {
|
||||||
|
DropdownMenu,
|
||||||
|
DropdownMenuCheckboxItem,
|
||||||
|
DropdownMenuContent,
|
||||||
|
DropdownMenuItem,
|
||||||
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
|
DropdownMenuTrigger,
|
||||||
|
} from "@/registry/default/ui/dropdown-menu"
|
||||||
|
import { Input } from "@/registry/default/ui/input"
|
||||||
|
import { Sheet, SheetContent, SheetTrigger } from "@/registry/default/ui/sheet"
|
||||||
|
import {
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableHead,
|
||||||
|
TableHeader,
|
||||||
|
TableRow,
|
||||||
|
} from "@/registry/default/ui/table"
|
||||||
|
import {
|
||||||
|
Tabs,
|
||||||
|
TabsContent,
|
||||||
|
TabsList,
|
||||||
|
TabsTrigger,
|
||||||
|
} from "@/registry/default/ui/tabs"
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/registry/default/ui/tooltip"
|
||||||
|
|
||||||
|
export const description =
|
||||||
|
"An products dashboard with a sidebar navigation. The sidebar has icon navigation. The content area has a breadcrumb and search in the header. It displays a list of products in a table with actions."
|
||||||
|
|
||||||
|
export const iframeHeight = "938px"
|
||||||
|
|
||||||
|
export const containerClassName = "w-full h-full"
|
||||||
|
|
||||||
|
export default function Dashboard() {
|
||||||
|
return (
|
||||||
|
<div className="flex min-h-screen w-full flex-col bg-muted/40">
|
||||||
|
<aside className="fixed inset-y-0 left-0 z-10 hidden w-14 flex-col border-r bg-background sm:flex">
|
||||||
|
<nav className="flex flex-col items-center gap-4 px-2 sm:py-5">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-9 w-9 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:h-8 md:w-8 md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-4 w-4 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Dashboard</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg bg-accent text-accent-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Orders</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Orders</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Products</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Products</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Customers</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Customers</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Analytics</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Analytics</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
<nav className="mt-auto flex flex-col items-center gap-4 px-2 sm:py-5">
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Settings className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Settings</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Settings</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
<div className="flex flex-col sm:gap-4 sm:py-4 sm:pl-14">
|
||||||
|
<header className="sticky top-0 z-30 flex h-14 items-center gap-4 border-b bg-background px-4 sm:static sm:h-auto sm:border-0 sm:bg-transparent sm:px-6">
|
||||||
|
<Sheet>
|
||||||
|
<SheetTrigger asChild>
|
||||||
|
<Button size="icon" variant="outline" className="sm:hidden">
|
||||||
|
<PanelLeft className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Toggle Menu</span>
|
||||||
|
</Button>
|
||||||
|
</SheetTrigger>
|
||||||
|
<SheetContent side="left" className="sm:max-w-xs">
|
||||||
|
<nav className="grid gap-6 text-lg font-medium">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-10 w-10 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-5 w-5 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
Dashboard
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
Orders
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-foreground"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
Products
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
Customers
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
Settings
|
||||||
|
</Link>
|
||||||
|
</nav>
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
|
<Breadcrumb className="hidden md:flex">
|
||||||
|
<BreadcrumbList>
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Dashboard</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Products</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbPage>All Products</BreadcrumbPage>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
</BreadcrumbList>
|
||||||
|
</Breadcrumb>
|
||||||
|
<div className="relative ml-auto flex-1 md:grow-0">
|
||||||
|
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
|
||||||
|
<Input
|
||||||
|
type="search"
|
||||||
|
placeholder="Search..."
|
||||||
|
className="w-full rounded-lg bg-background pl-8 md:w-[200px] lg:w-[336px]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="icon"
|
||||||
|
className="overflow-hidden rounded-full"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/placeholder-user.jpg"
|
||||||
|
width={36}
|
||||||
|
height={36}
|
||||||
|
alt="Avatar"
|
||||||
|
className="overflow-hidden"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Settings</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Support</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Logout</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</header>
|
||||||
|
<main className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-8">
|
||||||
|
<Tabs defaultValue="all">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<TabsList>
|
||||||
|
<TabsTrigger value="all">All</TabsTrigger>
|
||||||
|
<TabsTrigger value="active">Active</TabsTrigger>
|
||||||
|
<TabsTrigger value="draft">Draft</TabsTrigger>
|
||||||
|
<TabsTrigger value="archived" className="hidden sm:flex">
|
||||||
|
Archived
|
||||||
|
</TabsTrigger>
|
||||||
|
</TabsList>
|
||||||
|
<div className="ml-auto flex items-center gap-2">
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button variant="outline" size="sm" className="h-8 gap-1">
|
||||||
|
<ListFilter className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
|
||||||
|
Filter
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Filter by</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuCheckboxItem checked>
|
||||||
|
Active
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
<DropdownMenuCheckboxItem>Draft</DropdownMenuCheckboxItem>
|
||||||
|
<DropdownMenuCheckboxItem>
|
||||||
|
Archived
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
<Button size="sm" variant="outline" className="h-8 gap-1">
|
||||||
|
<File className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
|
||||||
|
Export
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
<Button size="sm" className="h-8 gap-1">
|
||||||
|
<PlusCircle className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
|
||||||
|
Add Product
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<TabsContent value="all">
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Products</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Manage your products and view their sales performance.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<Table>
|
||||||
|
<TableHeader>
|
||||||
|
<TableRow>
|
||||||
|
<TableHead className="hidden w-[100px] sm:table-cell">
|
||||||
|
<span className="sr-only">Image</span>
|
||||||
|
</TableHead>
|
||||||
|
<TableHead>Name</TableHead>
|
||||||
|
<TableHead>Status</TableHead>
|
||||||
|
<TableHead className="hidden md:table-cell">
|
||||||
|
Price
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="hidden md:table-cell">
|
||||||
|
Total Sales
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="hidden md:table-cell">
|
||||||
|
Created at
|
||||||
|
</TableHead>
|
||||||
|
<TableHead>
|
||||||
|
<span className="sr-only">Actions</span>
|
||||||
|
</TableHead>
|
||||||
|
</TableRow>
|
||||||
|
</TableHeader>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
Laser Lemonade Machine
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Draft</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
$499.99
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
25
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-07-12 10:42 AM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
Hypernova Headphones
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Active</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
$129.99
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
100
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-10-18 03:21 PM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
AeroGlow Desk Lamp
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Active</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
$39.99
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
50
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-11-29 08:15 AM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
TechTonic Energy Drink
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="secondary">Draft</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
$2.99
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
0
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-12-25 11:59 PM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
Gamer Gear Pro Controller
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Active</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
$59.99
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
75
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2024-01-01 12:00 AM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
Luminous VR Headset
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Active</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
$199.99
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
30
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2024-02-14 02:14 PM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
Showing <strong>1-10</strong> of <strong>32</strong>{" "}
|
||||||
|
products
|
||||||
|
</div>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</TabsContent>
|
||||||
|
</Tabs>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
607
apps/www/registry/default/block/dashboard-07.tsx
Normal file
607
apps/www/registry/default/block/dashboard-07.tsx
Normal file
@@ -0,0 +1,607 @@
|
|||||||
|
import Image from "next/image"
|
||||||
|
import Link from "next/link"
|
||||||
|
import {
|
||||||
|
ChevronLeft,
|
||||||
|
Home,
|
||||||
|
LineChart,
|
||||||
|
Package,
|
||||||
|
Package2,
|
||||||
|
PanelLeft,
|
||||||
|
PlusCircle,
|
||||||
|
Search,
|
||||||
|
Settings,
|
||||||
|
ShoppingCart,
|
||||||
|
Upload,
|
||||||
|
Users2,
|
||||||
|
} from "lucide-react"
|
||||||
|
|
||||||
|
import { Badge } from "@/registry/default/ui/badge"
|
||||||
|
import {
|
||||||
|
Breadcrumb,
|
||||||
|
BreadcrumbItem,
|
||||||
|
BreadcrumbLink,
|
||||||
|
BreadcrumbList,
|
||||||
|
BreadcrumbPage,
|
||||||
|
BreadcrumbSeparator,
|
||||||
|
} from "@/registry/default/ui/breadcrumb"
|
||||||
|
import { Button } from "@/registry/default/ui/button"
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/registry/default/ui/card"
|
||||||
|
import {
|
||||||
|
DropdownMenu,
|
||||||
|
DropdownMenuContent,
|
||||||
|
DropdownMenuItem,
|
||||||
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
|
DropdownMenuTrigger,
|
||||||
|
} from "@/registry/default/ui/dropdown-menu"
|
||||||
|
import { Input } from "@/registry/default/ui/input"
|
||||||
|
import { Label } from "@/registry/default/ui/label"
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from "@/registry/default/ui/select"
|
||||||
|
import { Sheet, SheetContent, SheetTrigger } from "@/registry/default/ui/sheet"
|
||||||
|
import {
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableHead,
|
||||||
|
TableHeader,
|
||||||
|
TableRow,
|
||||||
|
} from "@/registry/default/ui/table"
|
||||||
|
import { Textarea } from "@/registry/default/ui/textarea"
|
||||||
|
import {
|
||||||
|
ToggleGroup,
|
||||||
|
ToggleGroupItem,
|
||||||
|
} from "@/registry/default/ui/toggle-group"
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/registry/default/ui/tooltip"
|
||||||
|
|
||||||
|
export const description =
|
||||||
|
"A product edit page. The product edit page has a form to edit the product details, stock, product category, product status, and product images. The product edit page has a sidebar navigation and a main content area. The main content area has a form to edit the product details, stock, product category, product status, and product images. The sidebar navigation has links to product details, stock, product category, product status, and product images."
|
||||||
|
|
||||||
|
export const iframeHeight = "1200px"
|
||||||
|
|
||||||
|
export const containerClassName = "w-full h-full"
|
||||||
|
|
||||||
|
export default function Dashboard() {
|
||||||
|
return (
|
||||||
|
<div className="flex min-h-screen w-full flex-col bg-muted/40">
|
||||||
|
<aside className="fixed inset-y-0 left-0 z-10 hidden w-14 flex-col border-r bg-background sm:flex">
|
||||||
|
<nav className="flex flex-col items-center gap-4 px-2 sm:py-5">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-9 w-9 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:h-8 md:w-8 md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-4 w-4 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Dashboard</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg bg-accent text-accent-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Orders</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Orders</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Products</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Products</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Customers</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Customers</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Analytics</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Analytics</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
<nav className="mt-auto flex flex-col items-center gap-4 px-2 sm:py-5">
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Settings className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Settings</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Settings</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
<div className="flex flex-col sm:gap-4 sm:py-4 sm:pl-14">
|
||||||
|
<header className="sticky top-0 z-30 flex h-14 items-center gap-4 border-b bg-background px-4 sm:static sm:h-auto sm:border-0 sm:bg-transparent sm:px-6">
|
||||||
|
<Sheet>
|
||||||
|
<SheetTrigger asChild>
|
||||||
|
<Button size="icon" variant="outline" className="sm:hidden">
|
||||||
|
<PanelLeft className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Toggle Menu</span>
|
||||||
|
</Button>
|
||||||
|
</SheetTrigger>
|
||||||
|
<SheetContent side="left" className="sm:max-w-xs">
|
||||||
|
<nav className="grid gap-6 text-lg font-medium">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-10 w-10 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-5 w-5 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
Dashboard
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
Orders
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-foreground"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
Products
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
Customers
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
Settings
|
||||||
|
</Link>
|
||||||
|
</nav>
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
|
<Breadcrumb className="hidden md:flex">
|
||||||
|
<BreadcrumbList>
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Dashboard</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Products</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbPage>Edit Product</BreadcrumbPage>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
</BreadcrumbList>
|
||||||
|
</Breadcrumb>
|
||||||
|
<div className="relative ml-auto flex-1 md:grow-0">
|
||||||
|
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
|
||||||
|
<Input
|
||||||
|
type="search"
|
||||||
|
placeholder="Search..."
|
||||||
|
className="w-full rounded-lg bg-background pl-8 md:w-[200px] lg:w-[336px]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="icon"
|
||||||
|
className="overflow-hidden rounded-full"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/placeholder-user.jpg"
|
||||||
|
width={36}
|
||||||
|
height={36}
|
||||||
|
alt="Avatar"
|
||||||
|
className="overflow-hidden"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Settings</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Support</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Logout</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</header>
|
||||||
|
<main className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-8">
|
||||||
|
<div className="mx-auto grid max-w-[59rem] flex-1 auto-rows-max gap-4">
|
||||||
|
<div className="flex items-center gap-4">
|
||||||
|
<Button variant="outline" size="icon" className="h-7 w-7">
|
||||||
|
<ChevronLeft className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Back</span>
|
||||||
|
</Button>
|
||||||
|
<h1 className="flex-1 shrink-0 whitespace-nowrap text-xl font-semibold tracking-tight sm:grow-0">
|
||||||
|
Pro Controller
|
||||||
|
</h1>
|
||||||
|
<Badge variant="outline" className="ml-auto sm:ml-0">
|
||||||
|
In stock
|
||||||
|
</Badge>
|
||||||
|
<div className="hidden items-center gap-2 md:ml-auto md:flex">
|
||||||
|
<Button variant="outline" size="sm">
|
||||||
|
Discard
|
||||||
|
</Button>
|
||||||
|
<Button size="sm">Save Product</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="grid gap-4 md:grid-cols-[1fr_250px] lg:grid-cols-3 lg:gap-8">
|
||||||
|
<div className="grid auto-rows-max items-start gap-4 lg:col-span-2 lg:gap-8">
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Product Details</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Lipsum dolor sit amet, consectetur adipiscing elit
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="grid gap-6">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="name">Name</Label>
|
||||||
|
<Input
|
||||||
|
id="name"
|
||||||
|
type="text"
|
||||||
|
className="w-full"
|
||||||
|
defaultValue="Gamer Gear Pro Controller"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="description">Description</Label>
|
||||||
|
<Textarea
|
||||||
|
id="description"
|
||||||
|
defaultValue="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam auctor, nisl nec ultricies ultricies, nunc nisl ultricies nunc, nec ultricies nunc nisl nec nunc."
|
||||||
|
className="min-h-32"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Stock</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Lipsum dolor sit amet, consectetur adipiscing elit
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<Table>
|
||||||
|
<TableHeader>
|
||||||
|
<TableRow>
|
||||||
|
<TableHead className="w-[100px]">SKU</TableHead>
|
||||||
|
<TableHead>Stock</TableHead>
|
||||||
|
<TableHead>Price</TableHead>
|
||||||
|
<TableHead className="w-[100px]">Size</TableHead>
|
||||||
|
</TableRow>
|
||||||
|
</TableHeader>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="font-semibold">
|
||||||
|
GGPC-001
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="stock-1" className="sr-only">
|
||||||
|
Stock
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="stock-1"
|
||||||
|
type="number"
|
||||||
|
defaultValue="100"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="price-1" className="sr-only">
|
||||||
|
Price
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="price-1"
|
||||||
|
type="number"
|
||||||
|
defaultValue="99.99"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<ToggleGroup
|
||||||
|
type="single"
|
||||||
|
defaultValue="s"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
<ToggleGroupItem value="s">S</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="m">M</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="l">L</ToggleGroupItem>
|
||||||
|
</ToggleGroup>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="font-semibold">
|
||||||
|
GGPC-002
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="stock-2" className="sr-only">
|
||||||
|
Stock
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="stock-2"
|
||||||
|
type="number"
|
||||||
|
defaultValue="143"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="price-2" className="sr-only">
|
||||||
|
Price
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="price-2"
|
||||||
|
type="number"
|
||||||
|
defaultValue="99.99"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<ToggleGroup
|
||||||
|
type="single"
|
||||||
|
defaultValue="m"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
<ToggleGroupItem value="s">S</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="m">M</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="l">L</ToggleGroupItem>
|
||||||
|
</ToggleGroup>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="font-semibold">
|
||||||
|
GGPC-003
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="stock-3" className="sr-only">
|
||||||
|
Stock
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="stock-3"
|
||||||
|
type="number"
|
||||||
|
defaultValue="32"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="price-3" className="sr-only">
|
||||||
|
Stock
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="price-3"
|
||||||
|
type="number"
|
||||||
|
defaultValue="99.99"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<ToggleGroup
|
||||||
|
type="single"
|
||||||
|
defaultValue="s"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
<ToggleGroupItem value="s">S</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="m">M</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="l">L</ToggleGroupItem>
|
||||||
|
</ToggleGroup>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter className="justify-center border-t p-4">
|
||||||
|
<Button size="sm" variant="ghost" className="gap-1">
|
||||||
|
<PlusCircle className="h-3.5 w-3.5" />
|
||||||
|
Add Variant
|
||||||
|
</Button>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Product Category</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="grid gap-6 sm:grid-cols-3">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="category">Category</Label>
|
||||||
|
<Select>
|
||||||
|
<SelectTrigger
|
||||||
|
id="category"
|
||||||
|
aria-label="Select category"
|
||||||
|
>
|
||||||
|
<SelectValue placeholder="Select category" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="clothing">Clothing</SelectItem>
|
||||||
|
<SelectItem value="electronics">
|
||||||
|
Electronics
|
||||||
|
</SelectItem>
|
||||||
|
<SelectItem value="accessories">
|
||||||
|
Accessories
|
||||||
|
</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="subcategory">
|
||||||
|
Subcategory (optional)
|
||||||
|
</Label>
|
||||||
|
<Select>
|
||||||
|
<SelectTrigger
|
||||||
|
id="subcategory"
|
||||||
|
aria-label="Select subcategory"
|
||||||
|
>
|
||||||
|
<SelectValue placeholder="Select subcategory" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="t-shirts">T-Shirts</SelectItem>
|
||||||
|
<SelectItem value="hoodies">Hoodies</SelectItem>
|
||||||
|
<SelectItem value="sweatshirts">
|
||||||
|
Sweatshirts
|
||||||
|
</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
<div className="grid auto-rows-max items-start gap-4 lg:gap-8">
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Product Status</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="grid gap-6">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="status">Status</Label>
|
||||||
|
<Select>
|
||||||
|
<SelectTrigger id="status" aria-label="Select status">
|
||||||
|
<SelectValue placeholder="Select status" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="draft">Draft</SelectItem>
|
||||||
|
<SelectItem value="published">Active</SelectItem>
|
||||||
|
<SelectItem value="archived">Archived</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card className="overflow-hidden">
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Product Images</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Lipsum dolor sit amet, consectetur adipiscing elit
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="grid gap-2">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square w-full rounded-md object-cover"
|
||||||
|
height="300"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="300"
|
||||||
|
/>
|
||||||
|
<div className="grid grid-cols-3 gap-2">
|
||||||
|
<button>
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square w-full rounded-md object-cover"
|
||||||
|
height="84"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="84"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square w-full rounded-md object-cover"
|
||||||
|
height="84"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="84"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button className="flex aspect-square w-full items-center justify-center rounded-md border border-dashed">
|
||||||
|
<Upload className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<span className="sr-only">Upload</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Archive Product</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Lipsum dolor sit amet, consectetur adipiscing elit.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div></div>
|
||||||
|
<Button size="sm" variant="secondary">
|
||||||
|
Archive Product
|
||||||
|
</Button>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center justify-center gap-2 md:hidden">
|
||||||
|
<Button variant="outline" size="sm">
|
||||||
|
Discard
|
||||||
|
</Button>
|
||||||
|
<Button size="sm">Save Product</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
720
apps/www/registry/new-york/block/dashboard-05.tsx
Normal file
720
apps/www/registry/new-york/block/dashboard-05.tsx
Normal file
@@ -0,0 +1,720 @@
|
|||||||
|
import Image from "next/image"
|
||||||
|
import Link from "next/link"
|
||||||
|
import {
|
||||||
|
ChevronLeft,
|
||||||
|
ChevronRight,
|
||||||
|
Copy,
|
||||||
|
CreditCard,
|
||||||
|
File,
|
||||||
|
Home,
|
||||||
|
LineChart,
|
||||||
|
ListFilter,
|
||||||
|
MoreVertical,
|
||||||
|
Package,
|
||||||
|
Package2,
|
||||||
|
PanelLeft,
|
||||||
|
Search,
|
||||||
|
Settings,
|
||||||
|
ShoppingCart,
|
||||||
|
Truck,
|
||||||
|
Users2,
|
||||||
|
} from "lucide-react"
|
||||||
|
|
||||||
|
import { Badge } from "@/registry/new-york/ui/badge"
|
||||||
|
import {
|
||||||
|
Breadcrumb,
|
||||||
|
BreadcrumbItem,
|
||||||
|
BreadcrumbLink,
|
||||||
|
BreadcrumbList,
|
||||||
|
BreadcrumbPage,
|
||||||
|
BreadcrumbSeparator,
|
||||||
|
} from "@/registry/new-york/ui/breadcrumb"
|
||||||
|
import { Button } from "@/registry/new-york/ui/button"
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/registry/new-york/ui/card"
|
||||||
|
import {
|
||||||
|
DropdownMenu,
|
||||||
|
DropdownMenuCheckboxItem,
|
||||||
|
DropdownMenuContent,
|
||||||
|
DropdownMenuItem,
|
||||||
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
|
DropdownMenuTrigger,
|
||||||
|
} from "@/registry/new-york/ui/dropdown-menu"
|
||||||
|
import { Input } from "@/registry/new-york/ui/input"
|
||||||
|
import {
|
||||||
|
Pagination,
|
||||||
|
PaginationContent,
|
||||||
|
PaginationItem,
|
||||||
|
} from "@/registry/new-york/ui/pagination"
|
||||||
|
import { Progress } from "@/registry/new-york/ui/progress"
|
||||||
|
import { Separator } from "@/registry/new-york/ui/separator"
|
||||||
|
import { Sheet, SheetContent, SheetTrigger } from "@/registry/new-york/ui/sheet"
|
||||||
|
import {
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableHead,
|
||||||
|
TableHeader,
|
||||||
|
TableRow,
|
||||||
|
} from "@/registry/new-york/ui/table"
|
||||||
|
import {
|
||||||
|
Tabs,
|
||||||
|
TabsContent,
|
||||||
|
TabsList,
|
||||||
|
TabsTrigger,
|
||||||
|
} from "@/registry/new-york/ui/tabs"
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/registry/new-york/ui/tooltip"
|
||||||
|
|
||||||
|
export const description =
|
||||||
|
"An orders dashboard with a sidebar navigation. The sidebar has icon navigation. The content area has a breadcrumb and search in the header. The main area has a list of recent orders with a filter and export button. The main area also has a detailed view of a single order with order details, shipping information, billing information, customer information, and payment information."
|
||||||
|
|
||||||
|
export const iframeHeight = "956px"
|
||||||
|
|
||||||
|
export const containerClassName = "w-full h-full"
|
||||||
|
|
||||||
|
export default function Dashboard() {
|
||||||
|
return (
|
||||||
|
<div className="flex min-h-screen w-full flex-col bg-muted/40">
|
||||||
|
<aside className="fixed inset-y-0 left-0 z-10 hidden w-14 flex-col border-r bg-background sm:flex">
|
||||||
|
<nav className="flex flex-col items-center gap-4 px-2 sm:py-4">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-9 w-9 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:h-8 md:w-8 md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-4 w-4 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Dashboard</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg bg-accent text-accent-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Orders</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Orders</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Products</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Products</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Customers</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Customers</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Analytics</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Analytics</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
<nav className="mt-auto flex flex-col items-center gap-4 px-2 sm:py-4">
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Settings className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Settings</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Settings</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
<div className="flex flex-col sm:gap-4 sm:py-4 sm:pl-14">
|
||||||
|
<header className="sticky top-0 z-30 flex h-14 items-center gap-4 border-b bg-background px-4 sm:static sm:h-auto sm:border-0 sm:bg-transparent sm:px-6">
|
||||||
|
<Sheet>
|
||||||
|
<SheetTrigger asChild>
|
||||||
|
<Button size="icon" variant="outline" className="sm:hidden">
|
||||||
|
<PanelLeft className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Toggle Menu</span>
|
||||||
|
</Button>
|
||||||
|
</SheetTrigger>
|
||||||
|
<SheetContent side="left" className="sm:max-w-xs">
|
||||||
|
<nav className="grid gap-6 text-lg font-medium">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-10 w-10 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-5 w-5 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
Dashboard
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-foreground"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
Orders
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
Products
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
Customers
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
Settings
|
||||||
|
</Link>
|
||||||
|
</nav>
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
|
<Breadcrumb className="hidden md:flex">
|
||||||
|
<BreadcrumbList>
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Dashboard</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Orders</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbPage>Recent Orders</BreadcrumbPage>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
</BreadcrumbList>
|
||||||
|
</Breadcrumb>
|
||||||
|
<div className="relative ml-auto flex-1 md:grow-0">
|
||||||
|
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
|
||||||
|
<Input
|
||||||
|
type="search"
|
||||||
|
placeholder="Search..."
|
||||||
|
className="w-full rounded-lg bg-background pl-8 md:w-[200px] lg:w-[320px]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="icon"
|
||||||
|
className="overflow-hidden rounded-full"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/placeholder-user.jpg"
|
||||||
|
width={36}
|
||||||
|
height={36}
|
||||||
|
alt="Avatar"
|
||||||
|
className="overflow-hidden"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Settings</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Support</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Logout</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</header>
|
||||||
|
<main className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-8 lg:grid-cols-3 xl:grid-cols-3">
|
||||||
|
<div className="grid auto-rows-max items-start gap-4 md:gap-8 lg:col-span-2">
|
||||||
|
<div className="grid gap-4 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-2 xl:grid-cols-4">
|
||||||
|
<Card className="sm:col-span-2">
|
||||||
|
<CardHeader className="pb-3">
|
||||||
|
<CardTitle>Your Orders</CardTitle>
|
||||||
|
<CardDescription className="max-w-lg text-balance leading-relaxed">
|
||||||
|
Introducing Our Dynamic Orders Dashboard for Seamless
|
||||||
|
Management and Insightful Analysis.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardFooter>
|
||||||
|
<Button>Create New Order</Button>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader className="pb-2">
|
||||||
|
<CardDescription>This Week</CardDescription>
|
||||||
|
<CardTitle className="text-4xl">$1329</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
+25% from last week
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<Progress value={25} aria-label="25% increase" />
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader className="pb-2">
|
||||||
|
<CardDescription>This Month</CardDescription>
|
||||||
|
<CardTitle className="text-3xl">$5,329</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
+10% from last month
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<Progress value={12} aria-label="12% increase" />
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
<Tabs defaultValue="week">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<TabsList>
|
||||||
|
<TabsTrigger value="week">Week</TabsTrigger>
|
||||||
|
<TabsTrigger value="month">Month</TabsTrigger>
|
||||||
|
<TabsTrigger value="year">Year</TabsTrigger>
|
||||||
|
</TabsList>
|
||||||
|
<div className="ml-auto flex items-center gap-2">
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="sm"
|
||||||
|
className="h-7 gap-1 text-sm"
|
||||||
|
>
|
||||||
|
<ListFilter className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only">Filter</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Filter by</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuCheckboxItem checked>
|
||||||
|
Fulfilled
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
<DropdownMenuCheckboxItem>
|
||||||
|
Declined
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
<DropdownMenuCheckboxItem>
|
||||||
|
Refunded
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
<Button
|
||||||
|
size="sm"
|
||||||
|
variant="outline"
|
||||||
|
className="h-7 gap-1 text-sm"
|
||||||
|
>
|
||||||
|
<File className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only">Export</span>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<TabsContent value="week">
|
||||||
|
<Card>
|
||||||
|
<CardHeader className="px-7">
|
||||||
|
<CardTitle>Orders</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Recent orders from your store.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<Table>
|
||||||
|
<TableHeader>
|
||||||
|
<TableRow>
|
||||||
|
<TableHead>Customer</TableHead>
|
||||||
|
<TableHead className="hidden sm:table-cell">
|
||||||
|
Type
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="hidden sm:table-cell">
|
||||||
|
Status
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="hidden md:table-cell">
|
||||||
|
Date
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="text-right">Amount</TableHead>
|
||||||
|
</TableRow>
|
||||||
|
</TableHeader>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow className="bg-accent">
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Liam Johnson</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
liam@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-23
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$250.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Olivia Smith</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
olivia@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Refund
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="outline">
|
||||||
|
Declined
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-24
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$150.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Liam Johnson</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
liam@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-23
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$250.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Noah Williams</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
noah@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Subscription
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-25
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$350.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Emma Brown</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
emma@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-26
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$450.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Liam Johnson</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
liam@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-23
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$250.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Olivia Smith</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
olivia@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Refund
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="outline">
|
||||||
|
Declined
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-24
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$150.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
<div className="font-medium">Emma Brown</div>
|
||||||
|
<div className="hidden text-sm text-muted-foreground md:inline">
|
||||||
|
emma@example.com
|
||||||
|
</div>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
Sale
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Badge className="text-xs" variant="secondary">
|
||||||
|
Fulfilled
|
||||||
|
</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-06-26
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right">$450.00</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</TabsContent>
|
||||||
|
</Tabs>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Card className="overflow-hidden">
|
||||||
|
<CardHeader className="flex flex-row items-start bg-muted/50">
|
||||||
|
<div className="grid gap-0.5">
|
||||||
|
<CardTitle className="group flex items-center gap-2 text-lg">
|
||||||
|
Order ID: Oe31b70H
|
||||||
|
<Button
|
||||||
|
size="icon"
|
||||||
|
variant="outline"
|
||||||
|
className="h-6 w-6 opacity-0 transition-opacity group-hover:opacity-100"
|
||||||
|
>
|
||||||
|
<Copy className="h-3 w-3" />
|
||||||
|
<span className="sr-only">Copy Order ID</span>
|
||||||
|
</Button>
|
||||||
|
</CardTitle>
|
||||||
|
<CardDescription>Date: November 23, 2023</CardDescription>
|
||||||
|
</div>
|
||||||
|
<div className="ml-auto flex items-center gap-1">
|
||||||
|
<Button size="sm" variant="outline" className="h-8 gap-1">
|
||||||
|
<Truck className="h-3.5 w-3.5" />
|
||||||
|
<span className="lg:sr-only xl:not-sr-only xl:whitespace-nowrap">
|
||||||
|
Track Order
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button size="icon" variant="outline" className="h-8 w-8">
|
||||||
|
<MoreVertical className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only">More</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Export</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Trash</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</div>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="p-6 text-sm">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<div className="font-semibold">Order Details</div>
|
||||||
|
<ul className="grid gap-3">
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">
|
||||||
|
Glimmer Lamps x <span>2</span>
|
||||||
|
</span>
|
||||||
|
<span>$250.00</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">
|
||||||
|
Aqua Filters x <span>1</span>
|
||||||
|
</span>
|
||||||
|
<span>$49.00</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<Separator className="my-2" />
|
||||||
|
<ul className="grid gap-3">
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">Subtotal</span>
|
||||||
|
<span>$299.00</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">Shipping</span>
|
||||||
|
<span>$5.00</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center justify-between">
|
||||||
|
<span className="text-muted-foreground">Tax</span>
|
||||||
|
<span>$25.00</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center justify-between font-semibold">
|
||||||
|
<span className="text-muted-foreground">Total</span>
|
||||||
|
<span>$329.00</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<Separator className="my-4" />
|
||||||
|
<div className="grid grid-cols-2 gap-4">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<div className="font-semibold">Shipping Information</div>
|
||||||
|
<address className="grid gap-0.5 not-italic text-muted-foreground">
|
||||||
|
<span>Liam Johnson</span>
|
||||||
|
<span>1234 Main St.</span>
|
||||||
|
<span>Anytown, CA 12345</span>
|
||||||
|
</address>
|
||||||
|
</div>
|
||||||
|
<div className="grid auto-rows-max gap-3">
|
||||||
|
<div className="font-semibold">Billing Information</div>
|
||||||
|
<div className="text-muted-foreground">
|
||||||
|
Same as shipping address
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Separator className="my-4" />
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<div className="font-semibold">Customer Information</div>
|
||||||
|
<dl className="grid gap-3">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<dt className="text-muted-foreground">Customer</dt>
|
||||||
|
<dd>Liam Johnson</dd>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<dt className="text-muted-foreground">Email</dt>
|
||||||
|
<dd>
|
||||||
|
<a href="mailto:">liam@acme.com</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<dt className="text-muted-foreground">Phone</dt>
|
||||||
|
<dd>
|
||||||
|
<a href="tel:">+1 234 567 890</a>
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<Separator className="my-4" />
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<div className="font-semibold">Payment Information</div>
|
||||||
|
<dl className="grid gap-3">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<dt className="flex items-center gap-1 text-muted-foreground">
|
||||||
|
<CreditCard className="h-4 w-4" />
|
||||||
|
Visa
|
||||||
|
</dt>
|
||||||
|
<dd>**** **** **** 4532</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter className="flex flex-row items-center border-t bg-muted/50 px-6 py-3">
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
Updated <time dateTime="2023-11-23">November 23, 2023</time>
|
||||||
|
</div>
|
||||||
|
<Pagination className="ml-auto mr-0 w-auto">
|
||||||
|
<PaginationContent>
|
||||||
|
<PaginationItem>
|
||||||
|
<Button size="icon" variant="outline" className="h-6 w-6">
|
||||||
|
<ChevronLeft className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only">Previous Order</span>
|
||||||
|
</Button>
|
||||||
|
</PaginationItem>
|
||||||
|
<PaginationItem>
|
||||||
|
<Button size="icon" variant="outline" className="h-6 w-6">
|
||||||
|
<ChevronRight className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only">Next Order</span>
|
||||||
|
</Button>
|
||||||
|
</PaginationItem>
|
||||||
|
</PaginationContent>
|
||||||
|
</Pagination>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
623
apps/www/registry/new-york/block/dashboard-06.tsx
Normal file
623
apps/www/registry/new-york/block/dashboard-06.tsx
Normal file
@@ -0,0 +1,623 @@
|
|||||||
|
import Image from "next/image"
|
||||||
|
import Link from "next/link"
|
||||||
|
import {
|
||||||
|
File,
|
||||||
|
Home,
|
||||||
|
LineChart,
|
||||||
|
ListFilter,
|
||||||
|
MoreHorizontal,
|
||||||
|
Package,
|
||||||
|
Package2,
|
||||||
|
PanelLeft,
|
||||||
|
PlusCircle,
|
||||||
|
Search,
|
||||||
|
Settings,
|
||||||
|
ShoppingCart,
|
||||||
|
Users2,
|
||||||
|
} from "lucide-react"
|
||||||
|
|
||||||
|
import { Badge } from "@/registry/new-york/ui/badge"
|
||||||
|
import {
|
||||||
|
Breadcrumb,
|
||||||
|
BreadcrumbItem,
|
||||||
|
BreadcrumbLink,
|
||||||
|
BreadcrumbList,
|
||||||
|
BreadcrumbPage,
|
||||||
|
BreadcrumbSeparator,
|
||||||
|
} from "@/registry/new-york/ui/breadcrumb"
|
||||||
|
import { Button } from "@/registry/new-york/ui/button"
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/registry/new-york/ui/card"
|
||||||
|
import {
|
||||||
|
DropdownMenu,
|
||||||
|
DropdownMenuCheckboxItem,
|
||||||
|
DropdownMenuContent,
|
||||||
|
DropdownMenuItem,
|
||||||
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
|
DropdownMenuTrigger,
|
||||||
|
} from "@/registry/new-york/ui/dropdown-menu"
|
||||||
|
import { Input } from "@/registry/new-york/ui/input"
|
||||||
|
import { Sheet, SheetContent, SheetTrigger } from "@/registry/new-york/ui/sheet"
|
||||||
|
import {
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableHead,
|
||||||
|
TableHeader,
|
||||||
|
TableRow,
|
||||||
|
} from "@/registry/new-york/ui/table"
|
||||||
|
import {
|
||||||
|
Tabs,
|
||||||
|
TabsContent,
|
||||||
|
TabsList,
|
||||||
|
TabsTrigger,
|
||||||
|
} from "@/registry/new-york/ui/tabs"
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/registry/new-york/ui/tooltip"
|
||||||
|
|
||||||
|
export const description =
|
||||||
|
"An products dashboard with a sidebar navigation. The sidebar has icon navigation. The content area has a breadcrumb and search in the header. It displays a list of products in a table with actions."
|
||||||
|
|
||||||
|
export const iframeHeight = "820px"
|
||||||
|
|
||||||
|
export const containerClassName = "w-full h-full"
|
||||||
|
|
||||||
|
export default function Dashboard() {
|
||||||
|
return (
|
||||||
|
<div className="flex min-h-screen w-full flex-col bg-muted/40">
|
||||||
|
<aside className="fixed inset-y-0 left-0 z-10 hidden w-14 flex-col border-r bg-background sm:flex">
|
||||||
|
<nav className="flex flex-col items-center gap-4 px-2 py-4">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-9 w-9 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:h-8 md:w-8 md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-4 w-4 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Dashboard</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Orders</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Orders</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg bg-accent text-accent-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Products</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Products</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Customers</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Customers</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Analytics</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Analytics</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
<nav className="mt-auto flex flex-col items-center gap-4 px-2 py-4">
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Settings className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Settings</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Settings</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
<div className="flex flex-col sm:gap-4 sm:py-4 sm:pl-14">
|
||||||
|
<header className="sticky top-0 z-30 flex h-14 items-center gap-4 border-b bg-background px-4 sm:static sm:h-auto sm:border-0 sm:bg-transparent sm:px-6">
|
||||||
|
<Sheet>
|
||||||
|
<SheetTrigger asChild>
|
||||||
|
<Button size="icon" variant="outline" className="sm:hidden">
|
||||||
|
<PanelLeft className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Toggle Menu</span>
|
||||||
|
</Button>
|
||||||
|
</SheetTrigger>
|
||||||
|
<SheetContent side="left" className="sm:max-w-xs">
|
||||||
|
<nav className="grid gap-6 text-lg font-medium">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-10 w-10 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-5 w-5 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
Dashboard
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
Orders
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-foreground"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
Products
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
Customers
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
Settings
|
||||||
|
</Link>
|
||||||
|
</nav>
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
|
<Breadcrumb className="hidden md:flex">
|
||||||
|
<BreadcrumbList>
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Dashboard</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Products</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbPage>All Products</BreadcrumbPage>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
</BreadcrumbList>
|
||||||
|
</Breadcrumb>
|
||||||
|
<div className="relative ml-auto flex-1 md:grow-0">
|
||||||
|
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
|
||||||
|
<Input
|
||||||
|
type="search"
|
||||||
|
placeholder="Search..."
|
||||||
|
className="w-full rounded-lg bg-background pl-8 md:w-[200px] lg:w-[320px]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="icon"
|
||||||
|
className="overflow-hidden rounded-full"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/placeholder-user.jpg"
|
||||||
|
width={36}
|
||||||
|
height={36}
|
||||||
|
alt="Avatar"
|
||||||
|
className="overflow-hidden"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Settings</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Support</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Logout</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</header>
|
||||||
|
<main className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-8">
|
||||||
|
<Tabs defaultValue="all">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<TabsList>
|
||||||
|
<TabsTrigger value="all">All</TabsTrigger>
|
||||||
|
<TabsTrigger value="active">Active</TabsTrigger>
|
||||||
|
<TabsTrigger value="draft">Draft</TabsTrigger>
|
||||||
|
<TabsTrigger value="archived" className="hidden sm:flex">
|
||||||
|
Archived
|
||||||
|
</TabsTrigger>
|
||||||
|
</TabsList>
|
||||||
|
<div className="ml-auto flex items-center gap-2">
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button variant="outline" size="sm" className="h-7 gap-1">
|
||||||
|
<ListFilter className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
|
||||||
|
Filter
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Filter by</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuCheckboxItem checked>
|
||||||
|
Active
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
<DropdownMenuCheckboxItem>Draft</DropdownMenuCheckboxItem>
|
||||||
|
<DropdownMenuCheckboxItem>
|
||||||
|
Archived
|
||||||
|
</DropdownMenuCheckboxItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
<Button size="sm" variant="outline" className="h-7 gap-1">
|
||||||
|
<File className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
|
||||||
|
Export
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
<Button size="sm" className="h-7 gap-1">
|
||||||
|
<PlusCircle className="h-3.5 w-3.5" />
|
||||||
|
<span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
|
||||||
|
Add Product
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<TabsContent value="all">
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Products</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Manage your products and view their sales performance.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<Table>
|
||||||
|
<TableHeader>
|
||||||
|
<TableRow>
|
||||||
|
<TableHead className="hidden w-[100px] sm:table-cell">
|
||||||
|
<span className="sr-only">Image</span>
|
||||||
|
</TableHead>
|
||||||
|
<TableHead>Name</TableHead>
|
||||||
|
<TableHead>Status</TableHead>
|
||||||
|
<TableHead>Price</TableHead>
|
||||||
|
<TableHead className="hidden md:table-cell">
|
||||||
|
Total Sales
|
||||||
|
</TableHead>
|
||||||
|
<TableHead className="hidden md:table-cell">
|
||||||
|
Created at
|
||||||
|
</TableHead>
|
||||||
|
<TableHead>
|
||||||
|
<span className="sr-only">Actions</span>
|
||||||
|
</TableHead>
|
||||||
|
</TableRow>
|
||||||
|
</TableHeader>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
Laser Lemonade Machine
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Draft</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>$499.99</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
25
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-07-12 10:42 AM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
Hypernova Headphones
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Active</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>$129.99</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
100
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-10-18 03:21 PM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
AeroGlow Desk Lamp
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Active</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>$39.99</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
50
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-11-29 08:15 AM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
TechTonic Energy Drink
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="secondary">Draft</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>$2.99</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
0
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2023-12-25 11:59 PM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
Gamer Gear Pro Controller
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Active</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>$59.99</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
75
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2024-01-01 12:00 AM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="hidden sm:table-cell">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square rounded-md object-cover"
|
||||||
|
height="64"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="64"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium">
|
||||||
|
Luminous VR Headset
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Badge variant="outline">Active</Badge>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>$199.99</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
30
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="hidden md:table-cell">
|
||||||
|
2024-02-14 02:14 PM
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
aria-haspopup="true"
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
>
|
||||||
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Toggle menu</span>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>Actions</DropdownMenuLabel>
|
||||||
|
<DropdownMenuItem>Edit</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Delete</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
Showing <strong>1-10</strong> of <strong>32</strong>{" "}
|
||||||
|
products
|
||||||
|
</div>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</TabsContent>
|
||||||
|
</Tabs>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
607
apps/www/registry/new-york/block/dashboard-07.tsx
Normal file
607
apps/www/registry/new-york/block/dashboard-07.tsx
Normal file
@@ -0,0 +1,607 @@
|
|||||||
|
import Image from "next/image"
|
||||||
|
import Link from "next/link"
|
||||||
|
import {
|
||||||
|
ChevronLeft,
|
||||||
|
Home,
|
||||||
|
LineChart,
|
||||||
|
Package,
|
||||||
|
Package2,
|
||||||
|
PanelLeft,
|
||||||
|
PlusCircle,
|
||||||
|
Search,
|
||||||
|
Settings,
|
||||||
|
ShoppingCart,
|
||||||
|
Upload,
|
||||||
|
Users2,
|
||||||
|
} from "lucide-react"
|
||||||
|
|
||||||
|
import { Badge } from "@/registry/new-york/ui/badge"
|
||||||
|
import {
|
||||||
|
Breadcrumb,
|
||||||
|
BreadcrumbItem,
|
||||||
|
BreadcrumbLink,
|
||||||
|
BreadcrumbList,
|
||||||
|
BreadcrumbPage,
|
||||||
|
BreadcrumbSeparator,
|
||||||
|
} from "@/registry/new-york/ui/breadcrumb"
|
||||||
|
import { Button } from "@/registry/new-york/ui/button"
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/registry/new-york/ui/card"
|
||||||
|
import {
|
||||||
|
DropdownMenu,
|
||||||
|
DropdownMenuContent,
|
||||||
|
DropdownMenuItem,
|
||||||
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
|
DropdownMenuTrigger,
|
||||||
|
} from "@/registry/new-york/ui/dropdown-menu"
|
||||||
|
import { Input } from "@/registry/new-york/ui/input"
|
||||||
|
import { Label } from "@/registry/new-york/ui/label"
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from "@/registry/new-york/ui/select"
|
||||||
|
import { Sheet, SheetContent, SheetTrigger } from "@/registry/new-york/ui/sheet"
|
||||||
|
import {
|
||||||
|
Table,
|
||||||
|
TableBody,
|
||||||
|
TableCell,
|
||||||
|
TableHead,
|
||||||
|
TableHeader,
|
||||||
|
TableRow,
|
||||||
|
} from "@/registry/new-york/ui/table"
|
||||||
|
import { Textarea } from "@/registry/new-york/ui/textarea"
|
||||||
|
import {
|
||||||
|
ToggleGroup,
|
||||||
|
ToggleGroupItem,
|
||||||
|
} from "@/registry/new-york/ui/toggle-group"
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/registry/new-york/ui/tooltip"
|
||||||
|
|
||||||
|
export const description =
|
||||||
|
"A product edit page. The product edit page has a form to edit the product details, stock, product category, product status, and product images. The product edit page has a sidebar navigation and a main content area. The main content area has a form to edit the product details, stock, product category, product status, and product images. The sidebar navigation has links to product details, stock, product category, product status, and product images."
|
||||||
|
|
||||||
|
export const iframeHeight = "1100px"
|
||||||
|
|
||||||
|
export const containerClassName = "w-full h-full"
|
||||||
|
|
||||||
|
export default function Dashboard() {
|
||||||
|
return (
|
||||||
|
<div className="flex min-h-screen w-full flex-col bg-muted/40">
|
||||||
|
<aside className="fixed inset-y-0 left-0 z-10 hidden w-14 flex-col border-r bg-background sm:flex">
|
||||||
|
<nav className="flex flex-col items-center gap-4 px-2 py-4">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-9 w-9 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:h-8 md:w-8 md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-4 w-4 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Dashboard</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Orders</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Orders</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg bg-accent text-accent-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Products</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Products</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Customers</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Customers</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Analytics</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Analytics</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
<nav className="mt-auto flex flex-col items-center gap-4 px-2 py-4">
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground md:h-8 md:w-8"
|
||||||
|
>
|
||||||
|
<Settings className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Settings</span>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Settings</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
<div className="flex flex-col sm:gap-4 sm:py-4 sm:pl-14">
|
||||||
|
<header className="sticky top-0 z-30 flex h-14 items-center gap-4 border-b bg-background px-4 sm:static sm:h-auto sm:border-0 sm:bg-transparent sm:px-6">
|
||||||
|
<Sheet>
|
||||||
|
<SheetTrigger asChild>
|
||||||
|
<Button size="icon" variant="outline" className="sm:hidden">
|
||||||
|
<PanelLeft className="h-5 w-5" />
|
||||||
|
<span className="sr-only">Toggle Menu</span>
|
||||||
|
</Button>
|
||||||
|
</SheetTrigger>
|
||||||
|
<SheetContent side="left" className="sm:max-w-xs">
|
||||||
|
<nav className="grid gap-6 text-lg font-medium">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="group flex h-10 w-10 shrink-0 items-center justify-center gap-2 rounded-full bg-primary text-lg font-semibold text-primary-foreground md:text-base"
|
||||||
|
>
|
||||||
|
<Package2 className="h-5 w-5 transition-all group-hover:scale-110" />
|
||||||
|
<span className="sr-only">Acme Inc</span>
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Home className="h-5 w-5" />
|
||||||
|
Dashboard
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<ShoppingCart className="h-5 w-5" />
|
||||||
|
Orders
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-foreground"
|
||||||
|
>
|
||||||
|
<Package className="h-5 w-5" />
|
||||||
|
Products
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<Users2 className="h-5 w-5" />
|
||||||
|
Customers
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
className="flex items-center gap-4 px-2.5 text-muted-foreground hover:text-foreground"
|
||||||
|
>
|
||||||
|
<LineChart className="h-5 w-5" />
|
||||||
|
Settings
|
||||||
|
</Link>
|
||||||
|
</nav>
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
|
<Breadcrumb className="hidden md:flex">
|
||||||
|
<BreadcrumbList>
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Dashboard</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbLink asChild>
|
||||||
|
<Link href="#">Products</Link>
|
||||||
|
</BreadcrumbLink>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
<BreadcrumbSeparator />
|
||||||
|
<BreadcrumbItem>
|
||||||
|
<BreadcrumbPage>Edit Product</BreadcrumbPage>
|
||||||
|
</BreadcrumbItem>
|
||||||
|
</BreadcrumbList>
|
||||||
|
</Breadcrumb>
|
||||||
|
<div className="relative ml-auto flex-1 md:grow-0">
|
||||||
|
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
|
||||||
|
<Input
|
||||||
|
type="search"
|
||||||
|
placeholder="Search..."
|
||||||
|
className="w-full rounded-lg bg-background pl-8 md:w-[200px] lg:w-[320px]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="icon"
|
||||||
|
className="overflow-hidden rounded-full"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/placeholder-user.jpg"
|
||||||
|
width={36}
|
||||||
|
height={36}
|
||||||
|
alt="Avatar"
|
||||||
|
className="overflow-hidden"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="end">
|
||||||
|
<DropdownMenuLabel>My Account</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Settings</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem>Support</DropdownMenuItem>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuItem>Logout</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</header>
|
||||||
|
<main className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-8">
|
||||||
|
<div className="mx-auto grid max-w-[59rem] flex-1 auto-rows-max gap-4">
|
||||||
|
<div className="flex items-center gap-4">
|
||||||
|
<Button variant="outline" size="icon" className="h-7 w-7">
|
||||||
|
<ChevronLeft className="h-4 w-4" />
|
||||||
|
<span className="sr-only">Back</span>
|
||||||
|
</Button>
|
||||||
|
<h1 className="flex-1 shrink-0 whitespace-nowrap text-xl font-semibold tracking-tight sm:grow-0">
|
||||||
|
Pro Controller
|
||||||
|
</h1>
|
||||||
|
<Badge variant="outline" className="ml-auto sm:ml-0">
|
||||||
|
In stock
|
||||||
|
</Badge>
|
||||||
|
<div className="hidden items-center gap-2 md:ml-auto md:flex">
|
||||||
|
<Button variant="outline" size="sm">
|
||||||
|
Discard
|
||||||
|
</Button>
|
||||||
|
<Button size="sm">Save Product</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="grid gap-4 md:grid-cols-[1fr_250px] lg:grid-cols-3 lg:gap-8">
|
||||||
|
<div className="grid auto-rows-max items-start gap-4 lg:col-span-2 lg:gap-8">
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Product Details</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Lipsum dolor sit amet, consectetur adipiscing elit
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="grid gap-6">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="name">Name</Label>
|
||||||
|
<Input
|
||||||
|
id="name"
|
||||||
|
type="text"
|
||||||
|
className="w-full"
|
||||||
|
defaultValue="Gamer Gear Pro Controller"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="description">Description</Label>
|
||||||
|
<Textarea
|
||||||
|
id="description"
|
||||||
|
defaultValue="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam auctor, nisl nec ultricies ultricies, nunc nisl ultricies nunc, nec ultricies nunc nisl nec nunc."
|
||||||
|
className="min-h-32"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Stock</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Lipsum dolor sit amet, consectetur adipiscing elit
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<Table>
|
||||||
|
<TableHeader>
|
||||||
|
<TableRow>
|
||||||
|
<TableHead className="w-[100px]">SKU</TableHead>
|
||||||
|
<TableHead>Stock</TableHead>
|
||||||
|
<TableHead>Price</TableHead>
|
||||||
|
<TableHead className="w-[100px]">Size</TableHead>
|
||||||
|
</TableRow>
|
||||||
|
</TableHeader>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="font-semibold">
|
||||||
|
GGPC-001
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="stock-1" className="sr-only">
|
||||||
|
Stock
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="stock-1"
|
||||||
|
type="number"
|
||||||
|
defaultValue="100"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="price-1" className="sr-only">
|
||||||
|
Price
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="price-1"
|
||||||
|
type="number"
|
||||||
|
defaultValue="99.99"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<ToggleGroup
|
||||||
|
type="single"
|
||||||
|
defaultValue="s"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
<ToggleGroupItem value="s">S</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="m">M</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="l">L</ToggleGroupItem>
|
||||||
|
</ToggleGroup>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="font-semibold">
|
||||||
|
GGPC-002
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="stock-2" className="sr-only">
|
||||||
|
Stock
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="stock-2"
|
||||||
|
type="number"
|
||||||
|
defaultValue="143"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="price-2" className="sr-only">
|
||||||
|
Price
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="price-2"
|
||||||
|
type="number"
|
||||||
|
defaultValue="99.99"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<ToggleGroup
|
||||||
|
type="single"
|
||||||
|
defaultValue="m"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
<ToggleGroupItem value="s">S</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="m">M</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="l">L</ToggleGroupItem>
|
||||||
|
</ToggleGroup>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell className="font-semibold">
|
||||||
|
GGPC-003
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="stock-3" className="sr-only">
|
||||||
|
Stock
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="stock-3"
|
||||||
|
type="number"
|
||||||
|
defaultValue="32"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<Label htmlFor="price-3" className="sr-only">
|
||||||
|
Stock
|
||||||
|
</Label>
|
||||||
|
<Input
|
||||||
|
id="price-3"
|
||||||
|
type="number"
|
||||||
|
defaultValue="99.99"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
|
<TableCell>
|
||||||
|
<ToggleGroup
|
||||||
|
type="single"
|
||||||
|
defaultValue="s"
|
||||||
|
variant="outline"
|
||||||
|
>
|
||||||
|
<ToggleGroupItem value="s">S</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="m">M</ToggleGroupItem>
|
||||||
|
<ToggleGroupItem value="l">L</ToggleGroupItem>
|
||||||
|
</ToggleGroup>
|
||||||
|
</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter className="justify-center border-t p-4">
|
||||||
|
<Button size="sm" variant="ghost" className="gap-1">
|
||||||
|
<PlusCircle className="h-3.5 w-3.5" />
|
||||||
|
Add Variant
|
||||||
|
</Button>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Product Category</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="grid gap-6 sm:grid-cols-3">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="category">Category</Label>
|
||||||
|
<Select>
|
||||||
|
<SelectTrigger
|
||||||
|
id="category"
|
||||||
|
aria-label="Select category"
|
||||||
|
>
|
||||||
|
<SelectValue placeholder="Select category" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="clothing">Clothing</SelectItem>
|
||||||
|
<SelectItem value="electronics">
|
||||||
|
Electronics
|
||||||
|
</SelectItem>
|
||||||
|
<SelectItem value="accessories">
|
||||||
|
Accessories
|
||||||
|
</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="subcategory">
|
||||||
|
Subcategory (optional)
|
||||||
|
</Label>
|
||||||
|
<Select>
|
||||||
|
<SelectTrigger
|
||||||
|
id="subcategory"
|
||||||
|
aria-label="Select subcategory"
|
||||||
|
>
|
||||||
|
<SelectValue placeholder="Select subcategory" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="t-shirts">T-Shirts</SelectItem>
|
||||||
|
<SelectItem value="hoodies">Hoodies</SelectItem>
|
||||||
|
<SelectItem value="sweatshirts">
|
||||||
|
Sweatshirts
|
||||||
|
</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
<div className="grid auto-rows-max items-start gap-4 lg:gap-8">
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Product Status</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="grid gap-6">
|
||||||
|
<div className="grid gap-3">
|
||||||
|
<Label htmlFor="status">Status</Label>
|
||||||
|
<Select>
|
||||||
|
<SelectTrigger id="status" aria-label="Select status">
|
||||||
|
<SelectValue placeholder="Select status" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="draft">Draft</SelectItem>
|
||||||
|
<SelectItem value="published">Active</SelectItem>
|
||||||
|
<SelectItem value="archived">Archived</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card className="overflow-hidden">
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Product Images</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Lipsum dolor sit amet, consectetur adipiscing elit
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="grid gap-2">
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square w-full rounded-md object-cover"
|
||||||
|
height="300"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="300"
|
||||||
|
/>
|
||||||
|
<div className="grid grid-cols-3 gap-2">
|
||||||
|
<button>
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square w-full rounded-md object-cover"
|
||||||
|
height="84"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="84"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<Image
|
||||||
|
alt="Product image"
|
||||||
|
className="aspect-square w-full rounded-md object-cover"
|
||||||
|
height="84"
|
||||||
|
src="/placeholder.svg"
|
||||||
|
width="84"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button className="flex aspect-square w-full items-center justify-center rounded-md border border-dashed">
|
||||||
|
<Upload className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<span className="sr-only">Upload</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Archive Product</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Lipsum dolor sit amet, consectetur adipiscing elit.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div></div>
|
||||||
|
<Button size="sm" variant="secondary">
|
||||||
|
Archive Product
|
||||||
|
</Button>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center justify-center gap-2 md:hidden">
|
||||||
|
<Button variant="outline" size="sm">
|
||||||
|
Discard
|
||||||
|
</Button>
|
||||||
|
<Button size="sm">Save Product</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user