{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shop-order-tracking",
  "type": "registry:component",
  "title": "Order Tracking",
  "description": "An order status section with a stylized city map where a courier van drives the route to a pulsing pin, an ETA card, a delivery timeline and the items in the parcel.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "ecommerce",
    "ecommerce",
    "order tracking",
    "delivery",
    "map",
    "timeline",
    "eta"
  ],
  "docs": "https://hyperblur.dev/effects/shop-order-tracking",
  "files": [
    {
      "path": "registry/hyperblur/shop-order-tracking.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/shop-order-tracking.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ShopTrackingEvent {\n  label: string;\n  detail: string;\n  time: string;\n}\n\nexport interface ShopTrackingItem {\n  name: string;\n  variant: string;\n  qty: number;\n  color?: string;\n}\n\nexport interface ShopOrderTrackingProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  orderId?: string;\n  title?: string;\n  eta?: string;\n  etaNote?: string;\n  events?: ShopTrackingEvent[];\n  currentStep?: number;\n  courier?: { name: string; vehicle: string; rating: string };\n  items?: ShopTrackingItem[];\n  address?: string;\n  duration?: number;\n  accent?: string;\n  onContactCourier?: (channel: \"call\" | \"message\") => void;\n}\n\nconst defaultEvents: ShopTrackingEvent[] = [\n  { label: \"Order placed\", detail: \"Payment confirmed\", time: \"Mon, 9:14 am\" },\n  { label: \"Packed\", detail: \"Rotterdam fulfilment centre\", time: \"Mon, 4:52 pm\" },\n  { label: \"Shipped\", detail: \"Handed to Veloce Express\", time: \"Tue, 7:30 am\" },\n  { label: \"Out for delivery\", detail: \"6 stops before yours\", time: \"Today, 11:05 am\" },\n  { label: \"Delivered\", detail: \"Leave at the front door\", time: \"Expected 2:40 pm\" },\n];\n\nconst defaultItems: ShopTrackingItem[] = [\n  { name: \"Arc Ceramic Pour-over\", variant: \"Sand\", qty: 1, color: \"#d6b48a\" },\n  { name: \"Linen Tea Towels\", variant: \"Set of 3 · Olive\", qty: 2, color: \"#7d8b5a\" },\n];\n\nconst ROUTE = \"M 46 214 L 46 168 Q 46 150 64 150 L 168 150 Q 186 150 186 132 L 186 92 Q 186 74 204 74 L 300 74 Q 318 74 318 56 L 318 40\";\n\nconst css = `\n.hb-yjb {\n  --hb-yjb-accent: #38bdf8;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yjb *, .hb-yjb *::before, .hb-yjb *::after { box-sizing: border-box; }\n.hb-yjb::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  background: radial-gradient(45% 50% at 30% 30%, color-mix(in srgb, var(--hb-yjb-accent) 10%, transparent), transparent 70%);\n  pointer-events: none;\n}\n.hb-yjb-inner { max-width: 1120px; margin: 0 auto; padding: 64px 20px; }\n@container (min-width: 820px) { .hb-yjb-inner { padding: 88px 32px; } }\n.hb-yjb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }\n.hb-yjb-order { margin: 0 0 10px; color: #8f8f8f; font: 500 12.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }\n.hb-yjb-title { margin: 0; font-size: clamp(28px, 4.2cqw, 42px); line-height: 1.06; letter-spacing: -.03em; font-weight: 650; }\n.hb-yjb-eta {\n  display: flex;\n  align-items: center;\n  gap: 14px;\n  padding: 12px 16px;\n  border: 1px solid color-mix(in srgb, var(--hb-yjb-accent) 30%, transparent);\n  border-radius: 16px;\n  background: color-mix(in srgb, var(--hb-yjb-accent) 8%, #0d0d0d);\n}\n.hb-yjb-eta small { display: block; color: #8f8f8f; font-size: 12px; }\n.hb-yjb-eta b { display: block; font-size: 18px; font-weight: 640; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }\n.hb-yjb-clock { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--hb-yjb-accent); }\n.hb-yjb-clock::before, .hb-yjb-clock::after {\n  content: \"\";\n  position: absolute;\n  left: 50%;\n  bottom: 50%;\n  width: 2px;\n  margin-left: -1px;\n  border-radius: 2px;\n  background: var(--hb-yjb-accent);\n  transform-origin: bottom;\n}\n.hb-yjb-clock::before { height: 11px; animation: hb-yjb-hand 4s linear infinite; }\n.hb-yjb-clock::after { height: 7px; transform: rotate(90deg); }\n.hb-yjb-grid { display: grid; gap: 14px; }\n@container (min-width: 820px) { .hb-yjb-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; } }\n.hb-yjb-card {\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 20px;\n  background: linear-gradient(180deg, #131313, #0e0e0e);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);\n  overflow: hidden;\n}\n.hb-yjb-map { position: relative; background: #0c0f12; }\n.hb-yjb-map svg { display: block; width: 100%; height: auto; }\n.hb-yjb-road { fill: none; stroke: #1b2229; stroke-width: 10; stroke-linecap: round; }\n.hb-yjb-road-thin { fill: none; stroke: #151b21; stroke-width: 5; }\n.hb-yjb-route-bg { fill: none; stroke: color-mix(in srgb, var(--hb-yjb-accent) 25%, transparent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }\n.hb-yjb-route {\n  fill: none;\n  stroke: var(--hb-yjb-accent);\n  stroke-width: 4;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  stroke-dasharray: 1 12;\n  animation: hb-yjb-march 1s linear infinite;\n}\n.hb-yjb-pin-pulse { transform-origin: center; transform-box: fill-box; animation: hb-yjb-ping 2s ease-out infinite; }\n.hb-yjb-courier {\n  position: absolute;\n  left: 14px;\n  right: 14px;\n  bottom: 14px;\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  padding: 10px 12px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 14px;\n  background: rgba(14, 14, 14, .82);\n  backdrop-filter: blur(10px);\n}\n.hb-yjb-cav {\n  flex: none;\n  display: grid;\n  place-items: center;\n  width: 38px;\n  height: 38px;\n  border-radius: 50%;\n  background: linear-gradient(135deg, #f59e0b, #b45309);\n  color: #0a0a0a;\n  font-size: 13px;\n  font-weight: 700;\n}\n.hb-yjb-cname { min-width: 0; flex: 1; font-size: 14px; font-weight: 600; }\n.hb-yjb-cname span { display: block; color: #8f8f8f; font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-yjb-ibtn {\n  flex: none;\n  display: grid;\n  place-items: center;\n  width: 36px;\n  height: 36px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 50%;\n  background: rgba(255, 255, 255, .04);\n  color: #ededed;\n  cursor: pointer;\n  transition: background .2s ease, border-color .2s ease;\n}\n.hb-yjb-ibtn:hover { background: rgba(255, 255, 255, .1); }\n.hb-yjb-ibtn:focus-visible { outline: 2px solid var(--hb-yjb-accent); outline-offset: 2px; }\n.hb-yjb-ibtn-primary { background: var(--hb-yjb-accent); border-color: var(--hb-yjb-accent); color: #04121a; }\n.hb-yjb-ibtn-primary:hover { background: color-mix(in srgb, var(--hb-yjb-accent) 85%, #fff); }\n.hb-yjb-side { padding: 22px; }\n.hb-yjb-progress { height: 4px; margin-bottom: 20px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }\n.hb-yjb-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--hb-yjb-accent) 50%, transparent), var(--hb-yjb-accent)); transform-origin: left; animation: hb-yjb-grow 1.2s cubic-bezier(.2, .8, .2, 1) both; }\n.hb-yjb-steps { position: relative; margin: 0; padding: 0; list-style: none; }\n.hb-yjb-step { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 2px 14px; padding-bottom: 18px; }\n.hb-yjb-step:last-child { padding-bottom: 0; }\n.hb-yjb-step::before {\n  content: \"\";\n  position: absolute;\n  left: 10px;\n  top: 22px;\n  bottom: 0;\n  width: 2px;\n  background: rgba(255, 255, 255, .08);\n}\n.hb-yjb-step:last-child::before { display: none; }\n.hb-yjb-step-done::before { background: var(--hb-yjb-accent); }\n.hb-yjb-dot {\n  position: relative;\n  display: grid;\n  place-items: center;\n  width: 22px;\n  height: 22px;\n  border-radius: 50%;\n  border: 2px solid rgba(255, 255, 255, .14);\n  background: #0e0e0e;\n  color: #04121a;\n}\n.hb-yjb-step-done .hb-yjb-dot { border-color: var(--hb-yjb-accent); background: var(--hb-yjb-accent); }\n.hb-yjb-step-now .hb-yjb-dot { border-color: var(--hb-yjb-accent); }\n.hb-yjb-step-now .hb-yjb-dot::after {\n  content: \"\";\n  width: 8px;\n  height: 8px;\n  border-radius: 50%;\n  background: var(--hb-yjb-accent);\n  box-shadow: 0 0 0 0 var(--hb-yjb-accent);\n  animation: hb-yjb-beat 1.6s ease-out infinite;\n}\n.hb-yjb-sl { font-size: 14.5px; font-weight: 600; color: #8f8f8f; }\n.hb-yjb-step-done .hb-yjb-sl, .hb-yjb-step-now .hb-yjb-sl { color: #ededed; }\n.hb-yjb-sd { grid-column: 2; color: #6b6b6b; font-size: 12.5px; }\n.hb-yjb-st { grid-column: 3; grid-row: 1; color: #6b6b6b; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }\n.hb-yjb-step-now .hb-yjb-st { color: var(--hb-yjb-accent); }\n.hb-yjb-items { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .06); display: grid; gap: 10px; }\n.hb-yjb-item { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }\n.hb-yjb-sw { flex: none; width: 38px; height: 38px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }\n.hb-yjb-item span:nth-child(2) { min-width: 0; flex: 1; }\n.hb-yjb-item small { display: block; color: #6b6b6b; font-size: 12px; }\n.hb-yjb-qty { color: #8f8f8f; font-size: 12.5px; font-variant-numeric: tabular-nums; }\n.hb-yjb-addr { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; color: #8f8f8f; font-size: 12.5px; line-height: 1.5; }\n@keyframes hb-yjb-march { to { stroke-dashoffset: -13; } }\n@keyframes hb-yjb-ping { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.2); } }\n@keyframes hb-yjb-beat { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }\n@keyframes hb-yjb-grow { from { transform: scaleX(0); } }\n@keyframes hb-yjb-hand { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-yjb *, .hb-yjb *::before, .hb-yjb *::after { animation: none !important; transition: none !important; }\n  .hb-yjb-mover { display: none; }\n}\n`;\n\nfunction blocks() {\n  const out: { x: number; y: number; w: number; h: number; o: number }[] = [];\n  for (let r = 0; r < 4; r++) {\n    for (let c = 0; c < 6; c++) {\n      const h = Math.imul(r * 31 + c * 7 + 3, 2654435761) >>> 0;\n      out.push({ x: 8 + c * 66, y: 8 + r * 66, w: 50 + (h % 6), h: 50 + ((h >>> 4) % 6), o: 0.5 + ((h >>> 8) % 40) / 100 });\n    }\n  }\n  return out;\n}\n\nconst cityBlocks = blocks();\n\nexport function ShopOrderTracking({\n  orderId = \"Order #HB-48213\",\n  title = \"Your order is on its way\",\n  eta = \"2:40 – 3:10 pm\",\n  etaNote = \"Arriving today\",\n  events = defaultEvents,\n  currentStep = 3,\n  courier = { name: \"Diego Ramos\", vehicle: \"Electric van · NL-482-K\", rating: \"4.98\" },\n  items = defaultItems,\n  address = \"Keizersgracht 214, 1016 DZ Amsterdam\",\n  duration = 14,\n  accent = \"#38bdf8\",\n  onContactCourier,\n  className,\n  style,\n  ...rest\n}: ShopOrderTrackingProps) {\n  const rawId = React.useId();\n  const routeId = `hb-yjb-r${rawId.replace(/[^a-zA-Z0-9_-]/g, \"\")}`;\n  const pct = events.length > 1 ? (Math.min(currentStep, events.length - 1) / (events.length - 1)) * 100 : 100;\n  const dur = `${Math.max(3, duration)}s`;\n  const initials = courier.name\n    .split(\" \")\n    .map((p) => p[0])\n    .join(\"\")\n    .slice(0, 2);\n\n  return (\n    <section\n      className={[\"hb-yjb\", className].filter(Boolean).join(\" \")}\n      style={{ \"--hb-yjb-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-shop-order-tracking\" precedence=\"default\">{css}</style>\n      <div className=\"hb-yjb-inner\">\n        <div className=\"hb-yjb-head\">\n          <div>\n            <p className=\"hb-yjb-order\">{orderId}</p>\n            <h2 className=\"hb-yjb-title\">{title}</h2>\n          </div>\n          <div className=\"hb-yjb-eta\">\n            <span className=\"hb-yjb-clock\" aria-hidden=\"true\" />\n            <span>\n              <small>{etaNote}</small>\n              <b>{eta}</b>\n            </span>\n          </div>\n        </div>\n        <div className=\"hb-yjb-grid\">\n          <div className=\"hb-yjb-card hb-yjb-map\">\n            <svg viewBox=\"0 0 400 270\" aria-label={`Map showing the courier route to ${address}`} role=\"img\">\n              <rect width=\"400\" height=\"270\" fill=\"#0c0f12\" />\n              {cityBlocks.map((b, i) => (\n                <rect key={i} x={b.x} y={b.y} width={b.w} height={b.h} rx=\"6\" fill=\"#12171c\" opacity={b.o.toFixed(2)} />\n              ))}\n              <path className=\"hb-yjb-road\" d=\"M0 150 H400 M0 74 H400 M186 0 V270 M46 0 V270 M318 0 V270\" />\n              <path className=\"hb-yjb-road-thin\" d=\"M0 214 H400 M0 12 H400 M252 0 V270 M120 0 V270\" />\n              <path d=\"M330 170 q30 10 70 0 V270 H300 q10 -60 30 -100Z\" fill=\"#0f2a33\" opacity=\".8\" />\n              <path id={routeId} className=\"hb-yjb-route-bg\" d={ROUTE} />\n              <path className=\"hb-yjb-route\" d={ROUTE} />\n              <g transform=\"translate(46 214)\">\n                <circle r=\"7\" fill=\"#0c0f12\" stroke=\"#8f8f8f\" strokeWidth=\"2\" />\n                <circle r=\"2.5\" fill=\"#8f8f8f\" />\n              </g>\n              <g transform=\"translate(318 40)\">\n                <circle className=\"hb-yjb-pin-pulse\" r=\"12\" fill={accent} opacity=\".5\" />\n                <path d=\"M0 4c-6-7-9-11-9-15a9 9 0 0 1 18 0c0 4-3 8-9 15Z\" fill={accent} transform=\"translate(0 -4)\" />\n                <circle cy=\"-15\" r=\"3.2\" fill=\"#04121a\" />\n              </g>\n              <g className=\"hb-yjb-mover\">\n                <animateMotion dur={dur} repeatCount=\"indefinite\" rotate=\"auto\" keyPoints=\"0;0.72;0.72\" keyTimes=\"0;0.85;1\" calcMode=\"linear\">\n                  <mpath href={`#${routeId}`} />\n                </animateMotion>\n                <circle r=\"13\" fill={accent} opacity=\".2\" />\n                <rect x=\"-9\" y=\"-6\" width=\"18\" height=\"12\" rx=\"3.5\" fill=\"#ededed\" />\n                <rect x=\"3\" y=\"-4.5\" width=\"4.5\" height=\"9\" rx=\"1.5\" fill={accent} />\n              </g>\n            </svg>\n            <div className=\"hb-yjb-courier\">\n              <span className=\"hb-yjb-cav\">{initials}</span>\n              <span className=\"hb-yjb-cname\">\n                {courier.name} · ★ {courier.rating}\n                <span>{courier.vehicle}</span>\n              </span>\n              <button type=\"button\" className=\"hb-yjb-ibtn\" aria-label={`Message ${courier.name}`} onClick={() => onContactCourier?.(\"message\")}>\n                <svg width=\"15\" height=\"15\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n                  <path d=\"M2.5 4A1.5 1.5 0 0 1 4 2.5h8A1.5 1.5 0 0 1 13.5 4v6A1.5 1.5 0 0 1 12 11.5H6.5L3.5 14v-2.5H4A1.5 1.5 0 0 1 2.5 10V4Z\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinejoin=\"round\" />\n                </svg>\n              </button>\n              <button type=\"button\" className=\"hb-yjb-ibtn hb-yjb-ibtn-primary\" aria-label={`Call ${courier.name}`} onClick={() => onContactCourier?.(\"call\")}>\n                <svg width=\"15\" height=\"15\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n                  <path d=\"M3 2.5h2.5l1.2 3-1.6 1a8 8 0 0 0 4.4 4.4l1-1.6 3 1.2V13a1 1 0 0 1-1 1A11 11 0 0 1 2 3.5a1 1 0 0 1 1-1Z\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinejoin=\"round\" />\n                </svg>\n              </button>\n            </div>\n          </div>\n          <div className=\"hb-yjb-card hb-yjb-side\">\n            <div className=\"hb-yjb-progress\" role=\"progressbar\" aria-valuenow={Math.round(pct)} aria-valuemin={0} aria-valuemax={100} aria-label=\"Delivery progress\">\n              <i style={{ width: `${pct.toFixed(1)}%` }} />\n            </div>\n            <ol className=\"hb-yjb-steps\">\n              {events.map((e, i) => {\n                const cls = i < currentStep ? \"hb-yjb-step hb-yjb-step-done\" : i === currentStep ? \"hb-yjb-step hb-yjb-step-now\" : \"hb-yjb-step\";\n                return (\n                  <li key={e.label + i} className={cls} aria-current={i === currentStep ? \"step\" : undefined}>\n                    <span className=\"hb-yjb-dot\" aria-hidden=\"true\">\n                      {i < currentStep ? (\n                        <svg width=\"11\" height=\"11\" viewBox=\"0 0 16 16\" fill=\"none\">\n                          <path d=\"m3.5 8.3 3 3 6-6.3\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                        </svg>\n                      ) : null}\n                    </span>\n                    <span className=\"hb-yjb-sl\">{e.label}</span>\n                    <span className=\"hb-yjb-st\">{e.time}</span>\n                    <span className=\"hb-yjb-sd\">{e.detail}</span>\n                  </li>\n                );\n              })}\n            </ol>\n            {items.length ? (\n              <div className=\"hb-yjb-items\">\n                {items.map((it) => (\n                  <div className=\"hb-yjb-item\" key={it.name}>\n                    <span className=\"hb-yjb-sw\" style={{ background: `linear-gradient(135deg, ${it.color ?? accent}, #1a1a1a)` }} />\n                    <span>\n                      {it.name}\n                      <small>{it.variant}</small>\n                    </span>\n                    <span className=\"hb-yjb-qty\">× {it.qty}</span>\n                  </div>\n                ))}\n              </div>\n            ) : null}\n            <div className=\"hb-yjb-addr\">\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style={{ flex: \"none\", marginTop: 2 }}>\n                <path d=\"M8 14s5-4.2 5-8A5 5 0 0 0 3 6c0 3.8 5 8 5 8Z\" stroke=\"currentColor\" strokeWidth=\"1.4\" />\n                <circle cx=\"8\" cy=\"6\" r=\"1.8\" stroke=\"currentColor\" strokeWidth=\"1.4\" />\n              </svg>\n              {address}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}