File size: 7,225 Bytes
c09f67c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | "use client";
import { Icons } from "@midday/ui/icons";
import { MaterialIcon } from "./homepage/icon-mapping";
export function HeaderCommandPanelPreview() {
const transaction = {
name: "Acme Corporation",
};
const invoices = [
{
id: 1,
name: "Invoice #INV-2025-001",
},
{
id: 2,
name: "Invoice #INV-2024-089",
},
];
const receipts = [
{
id: 1,
name: "Receipt - Acme Services",
},
{
id: 2,
name: "Receipt - Acme Subscription",
},
];
const files = [
{
id: 1,
name: "Acme_Contract_Q1_2025.pdf",
},
{
id: 2,
name: "Invoice_Acme_2025-001.pdf",
},
];
return (
<div className="w-full h-full flex items-center justify-center p-2 bg-background">
{/* Container with border and dotted pattern */}
<div
className="w-full h-full border border-border p-2 relative scale-50 origin-center"
style={{
backgroundImage:
"radial-gradient(circle at 1px 1px, hsl(var(--border)) 0.5px, transparent 0)",
backgroundSize: "6px 6px",
}}
>
{/* Command Panel Container */}
<div className="w-full h-full border border-border bg-background flex flex-col relative">
{/* Search Bar */}
<div className="pt-1 pb-1 border-b border-border flex items-center">
<div className="relative w-full">
<input
type="text"
value="Acme"
readOnly
placeholder="Type a command or search..."
className="w-full bg-background px-2 py-1 text-[11px] text-foreground placeholder:text-muted-foreground focus:outline-none rounded-none pr-7"
/>
<MaterialIcon
name="search"
className="absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"
size={14}
/>
</div>
</div>
{/* Content Area */}
<div className="flex-1 overflow-hidden px-2 py-2">
{/* Transaction Section */}
<div className="mb-3">
<div className="text-[10px] text-muted-foreground uppercase tracking-wider mb-1.5 px-1">
Transaction
</div>
<div className="flex items-center gap-2 pr-2 py-1">
<MaterialIcon
name="list_alt"
className="text-muted-foreground flex-shrink-0"
size={16}
/>
<div className="flex-1 min-w-0">
<div className="text-[11px] text-foreground">
{transaction.name}
</div>
</div>
</div>
</div>
{/* Invoice Section */}
<div className="mb-3">
<div className="text-[10px] text-muted-foreground uppercase tracking-wider mb-1.5 px-1">
Invoice
</div>
<div className="space-y-0.5">
{invoices.map((invoice) => (
<div
key={invoice.id}
className="flex items-center gap-2 pr-2 py-1"
>
<MaterialIcon
name="docs"
className="text-muted-foreground flex-shrink-0"
size={16}
/>
<div className="flex-1 min-w-0">
<div className="text-[11px] text-foreground">
{invoice.name}
</div>
</div>
</div>
))}
</div>
</div>
{/* Receipts Section */}
<div className="mb-3">
<div className="text-[10px] text-muted-foreground uppercase tracking-wider mb-1.5 px-1">
Receipt
</div>
<div className="space-y-0.5">
{receipts.map((receipt) => (
<div
key={receipt.id}
className="flex items-center gap-2 pr-2 py-1"
>
<MaterialIcon
name="receipt"
className="text-muted-foreground flex-shrink-0"
size={16}
/>
<div className="flex-1 min-w-0">
<div className="text-[11px] text-foreground">
{receipt.name}
</div>
</div>
</div>
))}
</div>
</div>
{/* Files Section */}
<div className="mb-3">
<div className="text-[10px] text-muted-foreground uppercase tracking-wider mb-1.5 px-1">
Files
</div>
<div className="space-y-0.5">
{files.map((file) => (
<div
key={file.id}
className="flex items-center gap-2 pr-2 py-1"
>
<MaterialIcon
name="pdf"
className="text-muted-foreground flex-shrink-0"
size={16}
/>
<div className="flex-1 min-w-0">
<div className="text-[11px] text-foreground truncate">
{file.name}
</div>
</div>
</div>
))}
</div>
</div>
</div>
{/* Navigation Controls */}
<div className="px-2 py-1.5 border-t border-border flex items-center justify-between">
<div className="flex items-center">
<Icons.LogoSmall className="w-4 h-4 text-muted-foreground" />
</div>
<div className="flex items-center gap-1">
<button
type="button"
className="w-5 h-5 flex items-center justify-center bg-muted hover:bg-muted/80 transition-colors"
>
<MaterialIcon
name="arrow_upward"
className="text-muted-foreground"
size={12}
/>
</button>
<button
type="button"
className="w-5 h-5 flex items-center justify-center bg-muted hover:bg-muted/80 transition-colors"
>
<MaterialIcon
name="arrow_downward"
className="text-muted-foreground"
size={12}
/>
</button>
<button
type="button"
className="w-5 h-5 flex items-center justify-center bg-muted hover:bg-muted/80 transition-colors"
>
<MaterialIcon
name="subdirectory_arrow_left"
className="text-muted-foreground"
size={12}
/>
</button>
</div>
</div>
</div>
</div>
</div>
);
}
|