{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pay-success-check",
  "type": "registry:component",
  "title": "Pay Success Check",
  "description": "A payment success state where a ring draws, a check strokes in, dots burst outward and the amount and reference fade up.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "payments",
    "success",
    "payment",
    "check",
    "confirmation",
    "confetti",
    "animation"
  ],
  "docs": "https://hyperblur.dev/effects/pay-success-check",
  "files": [
    {
      "path": "registry/hyperblur/pay-success-check.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/pay-success-check.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface PaySuccessCheckProps extends React.HTMLAttributes<HTMLDivElement> {\n  amount?: string;\n  reference?: string;\n  title?: string;\n  message?: string;\n  accent?: string;\n  loop?: boolean;\n  loopDelay?: number;\n}\n\nconst css = `\n.hb-qf4 {\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 100%;\n  color: #ededed;\n  font-family: inherit;\n  text-align: center;\n}\n.hb-qf4 *, .hb-qf4 *::before, .hb-qf4 *::after { box-sizing: border-box; }\n.hb-qf4-in { display: flex; flex-direction: column; align-items: center; width: 100%; }\n.hb-qf4-badge { position: relative; width: 80px; height: 80px; flex: none; }\n.hb-qf4-glow {\n  position: absolute;\n  inset: -6px;\n  border-radius: 50%;\n  background: radial-gradient(circle, color-mix(in srgb, var(--hb-qf4-x) 38%, transparent), transparent 68%);\n  animation: hb-qf4-glow 0.9s ease-out 0.35s both;\n}\n.hb-qf4-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }\n.hb-qf4-disc { fill: color-mix(in srgb, var(--hb-qf4-x) 14%, transparent); transform-origin: 40px 40px; animation: hb-qf4-fill 0.5s ease-out 0.5s both; }\n.hb-qf4-ring {\n  fill: none;\n  stroke: var(--hb-qf4-x);\n  stroke-width: 3.5;\n  stroke-linecap: round;\n  stroke-dasharray: 1 1.2;\n  stroke-dashoffset: 0;\n  transform: rotate(-90deg);\n  transform-origin: 40px 40px;\n  animation: hb-qf4-draw 0.65s cubic-bezier(0.5, 0, 0.2, 1) both;\n}\n.hb-qf4-tick {\n  fill: none;\n  stroke: var(--hb-qf4-x);\n  stroke-width: 4.5;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  stroke-dasharray: 1 1.2;\n  stroke-dashoffset: 0;\n  animation: hb-qf4-draw 0.45s cubic-bezier(0.5, 0, 0.2, 1) 0.55s both;\n}\n.hb-qf4-dot {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: var(--s);\n  height: var(--s);\n  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);\n  background: var(--c);\n  border-radius: 50%;\n  opacity: 0;\n  animation: hb-qf4-burst 0.9s cubic-bezier(0.15, 0.7, 0.3, 1) 0.8s both;\n}\n.hb-qf4-dot[data-sq=\"true\"] { border-radius: 1px; }\n.hb-qf4-title {\n  margin: 12px 0 0;\n  font-size: 15px;\n  font-weight: 600;\n  letter-spacing: -0.005em;\n  animation: hb-qf4-up 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.85s both;\n}\n.hb-qf4-amt {\n  margin: 2px 0 0;\n  font-size: 30px;\n  font-weight: 650;\n  letter-spacing: -0.03em;\n  line-height: 1.15;\n  font-variant-numeric: tabular-nums;\n  animation: hb-qf4-up 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.95s both;\n}\n.hb-qf4-msg { margin: 2px 0 0; color: #8f8f8f; font-size: 12.5px; animation: hb-qf4-up 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 1.02s both; }\n.hb-qf4-ref {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  margin-top: 8px;\n  padding: 4px 10px;\n  color: #a1a1a1;\n  font-size: 11.5px;\n  background: #151515;\n  border: 1px solid #262626;\n  border-radius: 999px;\n  animation: hb-qf4-up 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s both;\n}\n.hb-qf4-ref b { color: #ededed; font-family: ui-monospace, \"SF Mono\", Menlo, Consolas, monospace; font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em; }\n@keyframes hb-qf4-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }\n@keyframes hb-qf4-fill { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }\n@keyframes hb-qf4-glow { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }\n@keyframes hb-qf4-burst {\n  0% { opacity: 1; transform: translate(0, 0) scale(0.2); }\n  70% { opacity: 1; }\n  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }\n}\n@keyframes hb-qf4-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-qf4-glow, .hb-qf4-disc, .hb-qf4-ring, .hb-qf4-tick, .hb-qf4-dot, .hb-qf4-title, .hb-qf4-amt, .hb-qf4-msg, .hb-qf4-ref { animation: none; }\n}\n`;\n\nconst palette = [\"#3ddc97\", \"#7fb3ff\", \"#ffd166\", \"#ff8fa3\"];\n\nconst dots = Array.from({ length: 14 }, (_, i) => {\n  const angle = ((i * 360) / 14 + (i % 2 ? 9 : 0)) * (Math.PI / 180);\n  const dist = 46 + ((i * 37) % 11);\n  return {\n    dx: (Math.cos(angle) * dist).toFixed(1),\n    dy: (Math.sin(angle) * dist).toFixed(1),\n    size: 3 + (i % 3),\n    color: palette[i % palette.length],\n    square: i % 4 === 1,\n    delay: ((i * 53) % 9) * 0.015,\n  };\n});\n\nexport function PaySuccessCheck({\n  amount = \"$48.00\",\n  reference = \"NV-48210\",\n  title = \"Payment successful\",\n  message = \"A receipt is on its way to your inbox.\",\n  accent = \"#3ddc97\",\n  loop = false,\n  loopDelay = 5200,\n  className = \"\",\n  style,\n  ...rest\n}: PaySuccessCheckProps) {\n  const [run, setRun] = React.useState(0);\n\n  React.useEffect(() => {\n    if (!loop) return;\n    const id = window.setInterval(() => setRun((r) => r + 1), Math.max(2500, loopDelay));\n    return () => window.clearInterval(id);\n  }, [loop, loopDelay]);\n\n  const vars = { \"--hb-qf4-x\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <div className={`hb-qf4 ${className}`} style={vars} role=\"status\" {...rest}>\n      <style href=\"hb-pay-success-check\" precedence=\"default\">{css}</style>\n      <div key={run} className=\"hb-qf4-in\">\n        <div className=\"hb-qf4-badge\" aria-hidden=\"true\">\n          <span className=\"hb-qf4-glow\" />\n          <svg className=\"hb-qf4-svg\" viewBox=\"0 0 80 80\">\n            <circle className=\"hb-qf4-disc\" cx=\"40\" cy=\"40\" r=\"34\" />\n            <circle className=\"hb-qf4-ring\" cx=\"40\" cy=\"40\" r=\"34\" pathLength=\"1\" />\n            <path className=\"hb-qf4-tick\" d=\"M26 41.5l9.5 9.5L55 30\" pathLength=\"1\" />\n          </svg>\n          {dots.map((d, i) => (\n            <span\n              key={i}\n              className=\"hb-qf4-dot\"\n              data-sq={d.square}\n              style={\n                {\n                  \"--dx\": `${d.dx}px`,\n                  \"--dy\": `${d.dy}px`,\n                  \"--s\": `${d.size}px`,\n                  \"--c\": d.color,\n                  animationDelay: `${(0.8 + d.delay).toFixed(3)}s`,\n                } as React.CSSProperties\n              }\n            />\n          ))}\n        </div>\n        <p className=\"hb-qf4-title\">{title}</p>\n        <p className=\"hb-qf4-amt\">{amount}</p>\n        {message && <p className=\"hb-qf4-msg\">{message}</p>}\n        {reference && (\n          <span className=\"hb-qf4-ref\">\n            Reference <b>{reference}</b>\n          </span>\n        )}\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}