{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "packing-slip-generator",
  "title": "Packing Slip Generator",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/packing-slip-generator/PackingSlipGenerator.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  Box,\n  Building2,\n  Check,\n  CheckCheck,\n  CheckCircle2,\n  Clock,\n  Copy,\n  FileDown,\n  MapPin,\n  Printer,\n  QrCode,\n  RotateCcw,\n  Scan,\n  ShieldCheck,\n  Tag,\n  Truck,\n  User,\n  Warehouse,\n  Zap,\n} from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Checkbox } from '@/components/ui/checkbox'\nimport { Separator } from '@/components/ui/separator'\nimport { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from '@/components/ui/table'\n\nexport interface PackingSlipItem {\n  id: string\n  sku: string\n  barcode: string\n  name: string\n  variant: string\n  location: string\n  qtyOrdered: number\n  qtyPacked: number\n  weightLbs: number\n  notes?: string\n  initialPacked?: boolean\n}\n\nexport interface PackingSlipProps {\n  className?: string\n  packingSlipNo?: string\n  orderNo?: string\n  carrier?: string\n  carrierService?: string\n  trackingNo?: string\n  orderDate?: string\n  shipDate?: string\n  warehouseName?: string\n  warehouseFacility?: string\n  warehouseAddress?: string\n  warehousePhone?: string\n  warehouseEmail?: string\n  customerName?: string\n  customerCompany?: string\n  customerAddress?: string\n  customerPhone?: string\n  customerEmail?: string\n  deliveryNotes?: string\n  pickerName?: string\n  pickerId?: string\n  packStation?: string\n  shift?: string\n  boxSize?: string\n  dunnageType?: string\n  qcInspector?: string\n  qcStamp?: string\n  qcTimestamp?: string\n  items?: PackingSlipItem[]\n  showActions?: boolean\n  initialPackedAll?: boolean\n}\n\nconst defaultItems: PackingSlipItem[] = [\n  {\n    id: 'item-1',\n    sku: '#SKU-84920',\n    barcode: '849201928410',\n    name: 'Aero Minimalist Runner',\n    variant: 'Size 10.5 · Matte Black',\n    location: 'Aisle 04 · Rack B · Shelf 02',\n    qtyOrdered: 1,\n    qtyPacked: 1,\n    weightLbs: 1.8,\n    notes: 'Eco-Knit Upper / EVA Cushioning Sole',\n    initialPacked: true,\n  },\n  {\n    id: 'item-2',\n    sku: '#SKU-77219',\n    barcode: '772198421093',\n    name: 'HydroShield Waterproof Shell Jacket',\n    variant: \"Men's M · Alpine Green\",\n    location: 'Aisle 02 · Rack D · Shelf 01',\n    qtyOrdered: 1,\n    qtyPacked: 1,\n    weightLbs: 1.6,\n    notes: '3-Layer DWR Membrane / Sealed Seams',\n    initialPacked: true,\n  },\n  {\n    id: 'item-3',\n    sku: '#SKU-31904',\n    barcode: '319045812903',\n    name: 'Ergonomic Trail Crew Socks (3-Pack)',\n    variant: 'Charcoal / Grey · L',\n    location: 'Aisle 08 · Rack A · Shelf 04',\n    qtyOrdered: 1,\n    qtyPacked: 1,\n    weightLbs: 1.4,\n    notes: 'Merino Wool Blend / Seamless Toe',\n    initialPacked: false,\n  },\n]\n\nexport function PackingSlipGenerator({\n  className,\n  packingSlipNo = '#PS-849201',\n  orderNo = '#ORD-92841',\n  carrier = 'FedEx',\n  carrierService = 'FedEx 2-Day Air',\n  trackingNo = '7849 2018 9284 1029',\n  orderDate = 'Aug 21, 2026',\n  shipDate = 'Aug 21, 2026',\n  warehouseName = 'Apex Retail Warehouse #04',\n  warehouseFacility = 'West Coast Omnichannel Hub',\n  warehouseAddress = '1040 North Industry Pkwy, Reno, NV 89502',\n  warehousePhone = '+1 (800) 555-0199',\n  warehouseEmail = 'fulfillment-reno4@apexretail.io',\n  customerName = 'Eleanor Vance',\n  customerCompany = 'Vance Design Studios · Suite 400',\n  customerAddress = '742 Evergreen Terrace, Springfield, OR 97477',\n  customerPhone = '+1 (555) 839-2019',\n  customerEmail = 'eleanor.vance@vancestudios.design',\n  deliveryNotes = 'Gate Code: #4829. Leave at covered front porch if unavailable. Do not bend.',\n  pickerName = 'Marcus Vance',\n  pickerId = '#EMP-4821',\n  packStation = 'Pack Station #4',\n  shift = 'Morning Shift · Bay Alpha',\n  boxSize = 'Box #3 · 14\" × 10\" × 6\"',\n  dunnageType = 'Recycled Kraft Void Fill (1.2 oz)',\n  qcInspector = 'Elena Rostova (#QC-89)',\n  qcStamp = 'QC Passed · Station #4',\n  qcTimestamp = '2026-08-21 09:42 PST',\n  items = defaultItems,\n  showActions = true,\n  initialPackedAll = false,\n}: PackingSlipProps) {\n  const effectiveItems = items && items.length > 0 ? items : defaultItems\n\n  const [packedState, setPackedState] = React.useState<Record<string, boolean>>(() => {\n    const map: Record<string, boolean> = {}\n    for (const item of effectiveItems) {\n      map[item.id] = initialPackedAll ? true : (item.initialPacked ?? false)\n    }\n    return map\n  })\n\n  const [copiedTracking, setCopiedTracking] = React.useState(false)\n  const [isDownloading, setIsDownloading] = React.useState(false)\n\n  const totalOrderedUnits = effectiveItems.reduce((sum, item) => sum + item.qtyOrdered, 0)\n  const totalPackedUnits = effectiveItems.reduce((sum, item) => {\n    return sum + (packedState[item.id] ? item.qtyPacked : 0)\n  }, 0)\n  const totalWeight = effectiveItems.reduce((sum, item) => sum + item.weightLbs, 0)\n\n  const verifiedItemsCount = effectiveItems.filter((item) => packedState[item.id]).length\n  const isAllPacked = effectiveItems.every((item) => packedState[item.id])\n  const progressPercentage =\n    effectiveItems.length === 0 ? 0 : Math.round((verifiedItemsCount / effectiveItems.length) * 100)\n\n  const toggleItemPacked = (id: string) => {\n    setPackedState((prev) => ({\n      ...prev,\n      [id]: !prev[id],\n    }))\n  }\n\n  const setItemPacked = (id: string, checked: boolean | 'indeterminate') => {\n    setPackedState((prev) => ({\n      ...prev,\n      [id]: checked === true,\n    }))\n  }\n\n  const markAllPacked = () => {\n    const next: Record<string, boolean> = {}\n    for (const item of effectiveItems) {\n      next[item.id] = true\n    }\n    setPackedState(next)\n  }\n\n  const resetPackingChecklist = () => {\n    const next: Record<string, boolean> = {}\n    for (const item of effectiveItems) {\n      next[item.id] = false\n    }\n    setPackedState(next)\n  }\n\n  const copyTrackingNumber = async () => {\n    if (typeof navigator !== 'undefined' && navigator.clipboard) {\n      await navigator.clipboard.writeText(trackingNo)\n      setCopiedTracking(true)\n      setTimeout(() => {\n        setCopiedTracking(false)\n      }, 2000)\n    }\n  }\n\n  const handlePrint = () => {\n    if (typeof window !== 'undefined') {\n      window.print()\n    }\n  }\n\n  const handleDownloadPdf = () => {\n    setIsDownloading(true)\n    setTimeout(() => {\n      setIsDownloading(false)\n    }, 1500)\n  }\n\n  return (\n    <div data-slot=\"packing-slip-generator\" className={cn('w-full space-y-6', className)}>\n      {/* Top Action & Fulfillment Toolbar (Screen Only) */}\n      {showActions && (\n        <div className=\"no-print border-border bg-card flex flex-col gap-4 rounded-xl border p-4 shadow-xs sm:flex-row sm:items-center sm:justify-between\">\n          <div className=\"flex flex-wrap items-center gap-3\">\n            <div className=\"flex items-center gap-2\">\n              <span className=\"text-foreground font-mono text-sm font-semibold tracking-tight\">{packingSlipNo}</span>\n              <Badge variant=\"outline\" className=\"gap-1 font-mono text-xs\">\n                <Tag className=\"text-muted-foreground size-3\" aria-hidden=\"true\" />\n                {orderNo}\n              </Badge>\n            </div>\n\n            <Separator orientation=\"vertical\" className=\"hidden h-4 sm:block\" />\n\n            <div className=\"text-muted-foreground flex items-center gap-1.5 text-xs\">\n              <Truck className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n              <span className=\"text-foreground font-medium\">{carrierService}</span>\n            </div>\n\n            <Badge variant={isAllPacked ? 'default' : 'secondary'} className=\"gap-1 text-xs font-medium\">\n              {isAllPacked ? (\n                <CheckCircle2 className=\"size-3\" aria-hidden=\"true\" />\n              ) : (\n                <Clock className=\"size-3\" aria-hidden=\"true\" />\n              )}\n              {isAllPacked\n                ? 'All Items Verified'\n                : `${verifiedItemsCount}/${effectiveItems.length} Packed (${progressPercentage}%)`}\n            </Badge>\n          </div>\n\n          <div className=\"flex flex-wrap items-center gap-2\">\n            <Button\n              type=\"button\"\n              variant=\"outline\"\n              size=\"sm\"\n              className=\"gap-1.5 text-xs font-medium\"\n              onClick={isAllPacked ? resetPackingChecklist : markAllPacked}\n            >\n              {isAllPacked ? (\n                <RotateCcw className=\"size-3.5\" aria-hidden=\"true\" />\n              ) : (\n                <CheckCheck className=\"size-3.5\" aria-hidden=\"true\" />\n              )}\n              {isAllPacked ? 'Reset Checklist' : 'Verify All'}\n            </Button>\n\n            <Button\n              aria-label=\"Download attachment\"\n              type=\"button\"\n              variant=\"outline\"\n              size=\"sm\"\n              className=\"gap-1.5 text-xs font-medium\"\n              disabled={isDownloading}\n              onClick={handleDownloadPdf}\n            >\n              <FileDown className=\"size-3.5\" aria-hidden=\"true\" />\n              {isDownloading ? 'Generating PDF...' : 'Download PDF'}\n            </Button>\n\n            <Button type=\"button\" size=\"sm\" className=\"gap-1.5 text-xs font-medium\" onClick={handlePrint}>\n              <Printer className=\"size-3.5\" aria-hidden=\"true\" />\n              Print 4x6 Slip\n            </Button>\n          </div>\n        </div>\n      )}\n\n      {/* Printable Packing Slip Paper Container */}\n      <div className=\"packing-slip-paper border-border bg-card mx-auto w-full max-w-4xl space-y-6 rounded-xl border p-6 shadow-md transition-shadow sm:p-8\">\n        {/* Section 1: Warehouse & Slip Header */}\n        <div className=\"flex flex-col gap-6 sm:flex-row sm:items-start sm:justify-between\">\n          <div className=\"space-y-2\">\n            <div className=\"flex items-center gap-2.5\">\n              <div className=\"bg-primary text-primary-foreground flex size-10 items-center justify-center rounded-lg shadow-xs\">\n                <Warehouse className=\"size-5\" aria-hidden=\"true\" />\n              </div>\n              <div>\n                <h2 className=\"text-foreground text-base font-semibold tracking-tight sm:text-lg\">{warehouseName}</h2>\n                <p className=\"text-muted-foreground text-xs\">{warehouseFacility}</p>\n              </div>\n            </div>\n            <div className=\"text-muted-foreground text-xs\">\n              <p>{warehouseAddress}</p>\n              <p className=\"mt-0.5\">\n                {warehousePhone} · {warehouseEmail}\n              </p>\n            </div>\n          </div>\n\n          {/* Slip Meta & Barcode Header */}\n          <div className=\"flex flex-col items-start gap-3 sm:items-end\">\n            <div className=\"border-primary/20 bg-primary/5 text-primary inline-flex items-center rounded-md border px-2.5 py-1 text-xs font-semibold\">\n              COMMERCIAL PACKING SLIP\n            </div>\n            <div className=\"space-y-1 text-left text-xs sm:text-right\">\n              <div className=\"flex items-center gap-2 sm:justify-end\">\n                <span className=\"text-muted-foreground\">Packing Slip Ref:</span>\n                <span className=\"text-foreground font-mono font-semibold\">{packingSlipNo}</span>\n              </div>\n              <div className=\"flex items-center gap-2 sm:justify-end\">\n                <span className=\"text-muted-foreground\">Order Reference:</span>\n                <span className=\"text-foreground font-mono font-semibold\">{orderNo}</span>\n              </div>\n              <div className=\"flex items-center gap-2 sm:justify-end\">\n                <span className=\"text-muted-foreground\">Order Date:</span>\n                <span className=\"text-foreground font-medium\">{orderDate}</span>\n              </div>\n              <div className=\"flex items-center gap-2 sm:justify-end\">\n                <span className=\"text-muted-foreground\">Ship Date:</span>\n                <span className=\"text-foreground font-medium\">{shipDate}</span>\n              </div>\n            </div>\n          </div>\n        </div>\n\n        <Separator />\n\n        {/* Section 2: Routing Grid (Ship-To, Origin, Carrier) */}\n        <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n          {/* Ship-To Customer Details */}\n          <div className=\"border-border/80 bg-muted/20 rounded-lg border p-4\">\n            <div className=\"text-muted-foreground mb-2.5 flex items-center gap-2 text-xs font-medium\">\n              <User className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n              Ship-To Recipient\n            </div>\n            <div className=\"space-y-1 text-xs\">\n              <p className=\"text-foreground text-sm font-semibold\">{customerName}</p>\n              <p className=\"text-foreground/80 font-medium\">{customerCompany}</p>\n              <p className=\"text-muted-foreground\">{customerAddress}</p>\n              <p className=\"text-muted-foreground\">{customerPhone}</p>\n              {deliveryNotes && (\n                <div className=\"border-warning/20 bg-warning/10 text-warning mt-2.5 rounded border p-2\">\n                  <p className=\"text-xs font-semibold\">Delivery Note:</p>\n                  <p className=\"text-xs\">{deliveryNotes}</p>\n                </div>\n              )}\n            </div>\n          </div>\n\n          {/* Ship-From Origin Hub */}\n          <div className=\"border-border/80 bg-muted/20 rounded-lg border p-4\">\n            <div className=\"text-muted-foreground mb-2.5 flex items-center gap-2 text-xs font-medium\">\n              <Building2 className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n              Fulfillment Origin\n            </div>\n            <div className=\"space-y-1 text-xs\">\n              <p className=\"text-foreground text-sm font-semibold\">{warehouseName}</p>\n              <p className=\"text-foreground/80 font-medium\">Outbound Logistics Dock #12</p>\n              <p className=\"text-muted-foreground\">{warehouseAddress}</p>\n              <p className=\"text-muted-foreground\">Support: {warehousePhone}</p>\n              <div className=\"text-muted-foreground mt-2.5 flex items-center gap-1.5 text-xs\">\n                <Zap className=\"text-success size-3\" aria-hidden=\"true\" />\n                <span>Direct EDI Dispatch Cleared</span>\n              </div>\n            </div>\n          </div>\n\n          {/* Carrier & Logistics Routing */}\n          <div className=\"border-border/80 bg-muted/20 rounded-lg border p-4\">\n            <div className=\"text-muted-foreground mb-2.5 flex items-center gap-2 text-xs font-medium\">\n              <Truck className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n              Carrier & Service\n            </div>\n            <div className=\"space-y-2 text-xs\">\n              <div>\n                <p className=\"text-foreground text-sm font-semibold\">{carrierService}</p>\n                <p className=\"text-muted-foreground\">Standard Air Parcel · Guaranteed</p>\n              </div>\n              <div>\n                <span className=\"text-muted-foreground\">Tracking Number:</span>\n                <div className=\"mt-1 flex items-center gap-2\">\n                  <span className=\"text-foreground font-mono text-xs font-semibold\">{trackingNo}</span>\n                  <button\n                    type=\"button\"\n                    className=\"no-print border-border hover:bg-muted focus-visible:ring-ring inline-flex size-6 items-center justify-center rounded border focus-visible:ring-2 focus-visible:outline-none\"\n                    title=\"Copy Tracking Number\"\n                    onClick={copyTrackingNumber}\n                  >\n                    {copiedTracking ? (\n                      <Check className=\"text-muted-foreground size-3\" aria-hidden=\"true\" />\n                    ) : (\n                      <Copy className=\"text-muted-foreground size-3\" aria-hidden=\"true\" />\n                    )}\n                  </button>\n                </div>\n              </div>\n              <div className=\"text-muted-foreground border-border/40 flex items-center justify-between border-t pt-1 text-xs\">\n                <span>Billing: Prepaid</span>\n                <span className=\"font-mono\">Declared: $349.00</span>\n              </div>\n            </div>\n          </div>\n        </div>\n\n        {/* Section 3: Picker & Pack Station Barcode Verification Ribbon */}\n        <div className=\"border-border bg-muted/40 flex flex-col gap-4 rounded-lg border p-4 sm:flex-row sm:items-center sm:justify-between\">\n          <div className=\"flex flex-wrap items-center gap-4\">\n            <div className=\"space-y-0.5\">\n              <div className=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                <User className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n                Picker & Station\n              </div>\n              <p className=\"text-foreground text-sm font-semibold\">\n                {pickerName} <span className=\"text-muted-foreground font-mono text-xs font-normal\">({pickerId})</span>\n              </p>\n              <p className=\"text-muted-foreground text-xs\">\n                {packStation} · {shift}\n              </p>\n            </div>\n\n            <Separator orientation=\"vertical\" className=\"hidden h-10 md:block\" />\n\n            <div className=\"space-y-0.5\">\n              <div className=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                <Scan className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n                Packing Progress\n              </div>\n              <div className=\"flex items-center gap-2\">\n                <div className=\"bg-muted border-border/50 h-2 w-28 overflow-hidden rounded-full border\">\n                  <div\n                    className=\"bg-primary h-full transition-[width] duration-300\"\n                    style={{ width: `${progressPercentage}%` }}\n                  />\n                </div>\n                <span className=\"text-foreground font-mono text-xs font-semibold tabular-nums\">\n                  {verifiedItemsCount}/{effectiveItems.length} Verified\n                </span>\n              </div>\n            </div>\n          </div>\n\n          {/* Authentic Code 128 Simulated Barcode Scan Tag */}\n          <div className=\"border-border/60 bg-background/80 flex flex-col items-center justify-center rounded border px-3 py-2 text-center shadow-2xs sm:items-end\">\n            <div className=\"flex h-8 items-center gap-[2px]\" aria-label=\"Barcode\">\n              <span className=\"bg-foreground h-8 w-[3px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[2px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[4px]\" />\n              <span className=\"h-8 w-[2px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[1px]\" />\n              <span className=\"bg-foreground h-8 w-[3px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[5px]\" />\n              <span className=\"h-8 w-[2px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[2px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[4px]\" />\n              <span className=\"h-8 w-[2px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[3px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[5px]\" />\n              <span className=\"h-8 w-[2px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[2px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[3px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[4px]\" />\n              <span className=\"h-8 w-[2px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[5px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[3px]\" />\n              <span className=\"h-8 w-[2px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[4px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[2px]\" />\n              <span className=\"h-8 w-[2px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[5px]\" />\n              <span className=\"h-8 w-[1px] bg-transparent\" />\n              <span className=\"bg-foreground h-8 w-[3px]\" />\n            </div>\n            <p className=\"text-foreground font-mono text-xs font-semibold tracking-widest\">\n              *{orderNo.replace('#', '')}*\n            </p>\n          </div>\n        </div>\n\n        {/* Section 4: Itemized Pick List Table */}\n        <div className=\"space-y-2\">\n          <div className=\"flex items-center justify-between\">\n            <div className=\"flex items-center gap-2\">\n              <h3 className=\"text-foreground text-sm font-semibold tracking-tight\">Itemized Pick & Pack Checklist</h3>\n              <Badge variant=\"outline\" className=\"font-mono text-xs\">\n                {effectiveItems.length} Line Items\n              </Badge>\n            </div>\n            <span className=\"text-muted-foreground text-xs\">Check items upon bin scan and physical carton packing</span>\n          </div>\n\n          <div className=\"border-border overflow-hidden rounded-lg border\">\n            <div className=\"overflow-x-auto\">\n              <Table>\n                <TableHeader className=\"bg-muted/40\">\n                  <TableRow>\n                    <TableHead className=\"w-12 text-center\">Packed</TableHead>\n                    <TableHead className=\"w-48\">Bin / Location</TableHead>\n                    <TableHead className=\"w-36\">SKU & Barcode</TableHead>\n                    <TableHead>Item Name & Variant Details</TableHead>\n                    <TableHead className=\"w-28 text-center\">Qty Pick/Ord</TableHead>\n                    <TableHead className=\"w-24 text-right\">Weight</TableHead>\n                  </TableRow>\n                </TableHeader>\n                <TableBody>\n                  {effectiveItems.map((item) => (\n                    <TableRow\n                      key={item.id}\n                      className={cn(\n                        'cursor-pointer transition-colors select-none',\n                        packedState[item.id] ? 'bg-primary/[0.02] dark:bg-primary/[0.04]' : 'hover:bg-muted/20',\n                      )}\n                      onClick={() => toggleItemPacked(item.id)}\n                    >\n                      {/* Interactive Packed Checkbox */}\n                      <TableCell className=\"text-center\" onClick={(e) => e.stopPropagation()}>\n                        <div className=\"flex items-center justify-center\">\n                          <Checkbox\n                            id={`chk-${item.id}`}\n                            checked={packedState[item.id] ?? false}\n                            onCheckedChange={(val) => setItemPacked(item.id, val)}\n                          />\n                        </div>\n                      </TableCell>\n\n                      {/* Warehouse Bin / Location Tag */}\n                      <TableCell>\n                        <div className=\"border-border bg-muted/60 text-foreground inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs font-medium\">\n                          <MapPin className=\"text-primary size-3 shrink-0\" aria-hidden=\"true\" />\n                          <span>{item.location}</span>\n                        </div>\n                      </TableCell>\n\n                      {/* SKU & Barcode */}\n                      <TableCell>\n                        <div className=\"space-y-0.5\">\n                          <p className=\"text-foreground font-mono text-xs font-semibold\">{item.sku}</p>\n                          <p className=\"text-muted-foreground font-mono text-xs\">UPC: {item.barcode}</p>\n                        </div>\n                      </TableCell>\n\n                      {/* Item Description & Variant Notes */}\n                      <TableCell>\n                        <div className=\"space-y-0.5\">\n                          <p\n                            className={cn(\n                              'text-foreground text-xs font-semibold',\n                              packedState[item.id] && 'text-foreground/90',\n                            )}\n                          >\n                            {item.name}\n                          </p>\n                          <p className=\"text-muted-foreground text-xs\">{item.variant}</p>\n                          {item.notes && <p className=\"text-muted-foreground/80 text-xs italic\">{item.notes}</p>}\n                        </div>\n                      </TableCell>\n\n                      {/* Quantity Ordered vs Packed */}\n                      <TableCell className=\"text-center\">\n                        <div className=\"border-border/80 bg-background text-foreground inline-flex items-center gap-1 rounded border px-2 py-0.5 font-mono text-xs font-semibold shadow-2xs\">\n                          <span className={packedState[item.id] ? 'text-primary' : 'text-foreground'}>\n                            {packedState[item.id] ? item.qtyPacked : 0}\n                          </span>\n                          <span className=\"text-muted-foreground font-normal\">/</span>\n                          <span className=\"tabular-nums\">{item.qtyOrdered}</span>\n                        </div>\n                      </TableCell>\n\n                      {/* Item Unit Weight */}\n                      <TableCell className=\"text-right\">\n                        <span className=\"text-foreground font-mono text-xs font-medium tabular-nums\">\n                          {item.weightLbs.toFixed(1)} lbs\n                        </span>\n                      </TableCell>\n                    </TableRow>\n                  ))}\n                </TableBody>\n                <TableFooter className=\"bg-muted/50 font-medium\">\n                  <TableRow>\n                    <TableCell colSpan={4} className=\"text-foreground text-left text-xs font-semibold\">\n                      Order Package Totals ({effectiveItems.length} Distinct SKUs)\n                    </TableCell>\n                    <TableCell className=\"text-foreground text-center font-mono text-xs font-semibold tabular-nums\">\n                      {totalPackedUnits} / {totalOrderedUnits} Units\n                    </TableCell>\n                    <TableCell className=\"text-foreground text-right font-mono text-xs font-semibold tabular-nums\">\n                      {totalWeight.toFixed(1)} lbs\n                    </TableCell>\n                  </TableRow>\n                </TableFooter>\n              </Table>\n            </div>\n          </div>\n        </div>\n\n        {/* Section 5: Package Summary & Quality Control Certification */}\n        <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n          {/* Package Carton Specs */}\n          <div className=\"border-border/80 bg-muted/20 space-y-2 rounded-lg border p-4\">\n            <div className=\"text-muted-foreground flex items-center gap-2 text-xs font-medium\">\n              <Box className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n              Carton Specifications\n            </div>\n            <div className=\"space-y-1.5 text-xs\">\n              <div className=\"flex items-center justify-between\">\n                <span className=\"text-muted-foreground\">Packing Box:</span>\n                <span className=\"text-foreground font-medium\">{boxSize}</span>\n              </div>\n              <div className=\"flex items-center justify-between\">\n                <span className=\"text-muted-foreground\">Total Units:</span>\n                <span className=\"text-foreground font-mono font-semibold\">{totalOrderedUnits} items</span>\n              </div>\n              <div className=\"flex items-center justify-between\">\n                <span className=\"text-muted-foreground\">Gross Weight:</span>\n                <span className=\"text-foreground font-mono font-semibold\">{totalWeight.toFixed(1)} lbs</span>\n              </div>\n              <div className=\"flex items-center justify-between\">\n                <span className=\"text-muted-foreground\">Void Fill / Dunnage:</span>\n                <span className=\"text-muted-foreground\">{dunnageType}</span>\n              </div>\n            </div>\n          </div>\n\n          {/* Customer Returns & Exchange Notice */}\n          <div className=\"border-border/80 bg-muted/20 space-y-2 rounded-lg border p-4\">\n            <div className=\"text-muted-foreground flex items-center gap-2 text-xs font-medium\">\n              <QrCode className=\"text-primary size-3.5\" aria-hidden=\"true\" />\n              Hassle-Free Returns\n            </div>\n            <div className=\"text-muted-foreground space-y-1 text-xs\">\n              <p className=\"text-foreground font-medium\">Need to make an exchange or return?</p>\n              <p>\n                Scan the QR code or visit <span className=\"text-foreground font-mono\">apexretail.com/returns</span>{' '}\n                within 30 days.\n              </p>\n              <p className=\"text-muted-foreground/90 pt-1 text-xs\">\n                Please include this packing slip with items in original condition.\n              </p>\n            </div>\n          </div>\n\n          {/* Quality Control Stamp Container */}\n          <div className=\"border-border/80 bg-muted/20 flex flex-col items-center justify-center rounded-lg border p-4\">\n            <div className=\"border-success/70 bg-success/10 border-success/70 bg-success/15 w-full rotate-[-1.5deg] rounded-lg border-2 border-dashed p-3 text-center transition-transform hover:rotate-0\">\n              <div className=\"text-success flex items-center justify-center gap-1.5\">\n                <ShieldCheck className=\"size-4 shrink-0\" aria-hidden=\"true\" />\n                <span className=\"font-mono text-xs font-semibold tracking-widest uppercase\">{qcStamp}</span>\n              </div>\n              <p className=\"text-success dark:text-foreground mt-1 font-mono text-xs font-semibold\">AUDITED & SEALED</p>\n              <p className=\"text-success/80 mt-0.5 text-xs\">Inspector: {qcInspector}</p>\n              <p className=\"text-success/70 font-mono text-xs\">{qcTimestamp}</p>\n            </div>\n          </div>\n        </div>\n\n        {/* Section 6: Document Footer Note */}\n        <div className=\"border-border text-muted-foreground flex flex-col items-center justify-between gap-2 border-t pt-4 text-xs sm:flex-row\">\n          <p>Generated by Apex Logistics WMS v4.8.2 · Station ID: {packStation}</p>\n          <p className=\"font-mono\">DOC ID: PS-2026-849201-US-04 · Barcode Validated</p>\n        </div>\n      </div>\n\n      <style>{`\n        @media print {\n          body {\n            background: white !important;\n            color: black !important;\n          }\n          .no-print {\n            display: none !important;\n          }\n          .packing-slip-paper {\n            border: none !important;\n            box-shadow: none !important;\n            padding: 0 !important;\n            margin: 0 !important;\n            max-width: 100% !important;\n          }\n        }\n      `}</style>\n    </div>\n  )\n}\n\nexport default PackingSlipGenerator\n",
      "type": "registry:block",
      "target": "~/components/blocks/PackingSlipGenerator.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/checkbox.json",
    "https://uipkge.dev/r/react/separator.json",
    "https://uipkge.dev/r/react/table.json"
  ],
  "description": "Shopify and ShipStation style warehouse order packing slip and picker verification checklist with warehouse header, customer ship-to routing, picker pack station barcode scan identifier, itemized pick list table with interactive packed checkboxes, bin location tags, SKU barcodes, weight calculations, and quality control inspector stamp.",
  "categories": [
    "logistics",
    "app",
    "ecommerce",
    "documents"
  ]
}