{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "input-file-drop",
  "type": "registry:component",
  "title": "File Drop Upload",
  "description": "An upload zone in three variants, panel, strip and round avatar, with a marching dashed border on drag and a lifting icon. Each file gets a typed document glyph, a progress ring and a bottom progress line, and rejected files shake with the reason.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "forms",
    "upload",
    "dropzone",
    "file",
    "drag-and-drop",
    "progress",
    "avatar"
  ],
  "docs": "https://hyperblur.dev/effects/input-file-drop",
  "files": [
    {
      "path": "registry/hyperblur/input-file-drop.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/input-file-drop.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface InputFileDropItem {\n  id: string;\n  name: string;\n  size: number;\n  type?: string;\n  progress: number;\n  status: \"uploading\" | \"done\" | \"error\";\n  error?: string;\n  file?: File;\n  preview?: string;\n}\n\nexport interface InputFileDropProps\n  extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\" | \"title\"> {\n  variant?: \"panel\" | \"strip\" | \"avatar\";\n  accept?: string;\n  maxSize?: number;\n  multiple?: boolean;\n  title?: string;\n  hint?: string;\n  defaultItems?: InputFileDropItem[];\n  onFilesChange?: (items: InputFileDropItem[]) => void;\n  onUpload?: (file: File, onProgress: (progress: number) => void) => Promise<void>;\n  accent?: string;\n  disabled?: boolean;\n}\n\nconst css = `\n.hb-xg7 {\n  --hb-xg7-c: #2f7bff;\n  box-sizing: border-box;\n  width: 100%;\n  font-family: inherit;\n  color: #ededed;\n}\n.hb-xg7 *, .hb-xg7 *::before, .hb-xg7 *::after { box-sizing: border-box; }\n.hb-xg7[data-disabled=\"true\"] { opacity: 0.5; pointer-events: none; }\n.hb-xg7-zone {\n  position: relative;\n  display: flex;\n  align-items: center;\n  border-radius: 16px;\n  background:\n    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.035), transparent 60%),\n    linear-gradient(180deg, #131313, #0e0e0e);\n  cursor: pointer;\n  outline: 0;\n  transition: background 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n.hb-xg7-zone:focus-visible { box-shadow: 0 0 0 2px #0a0a0a, 0 0 0 4px var(--hb-xg7-c); }\n.hb-xg7-ants { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }\n.hb-xg7-ants rect { fill: none; stroke: #333; stroke-width: 1.2; stroke-dasharray: 6 5; transition: stroke 0.25s ease; }\n.hb-xg7-zone:hover .hb-xg7-ants rect { stroke: #4a4a4a; }\n.hb-xg7[data-over=\"true\"] .hb-xg7-ants rect { stroke: var(--hb-xg7-c); stroke-width: 1.6; animation: hb-xg7-march 0.6s linear infinite; }\n.hb-xg7[data-over=\"true\"] .hb-xg7-zone {\n  background:\n    radial-gradient(90% 120% at 50% 50%, color-mix(in srgb, var(--hb-xg7-c) 14%, transparent), transparent 70%),\n    linear-gradient(180deg, #131313, #0e0e0e);\n  transform: scale(1.012);\n}\n.hb-xg7[data-variant=\"panel\"] .hb-xg7-zone { flex-direction: column; justify-content: center; gap: 4px; min-height: 150px; padding: 20px; text-align: center; }\n.hb-xg7[data-variant=\"strip\"] .hb-xg7-zone { gap: 12px; min-height: 60px; padding: 10px 10px 10px 12px; }\n.hb-xg7-orb {\n  position: relative;\n  display: grid;\n  place-items: center;\n  width: 42px;\n  height: 42px;\n  flex: none;\n  border-radius: 12px;\n  background: linear-gradient(180deg, #232323, #161616);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px #262626;\n  color: #a1a1a1;\n  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;\n}\n.hb-xg7[data-variant=\"panel\"] .hb-xg7-orb { margin-bottom: 8px; }\n.hb-xg7[data-variant=\"strip\"] .hb-xg7-orb { width: 36px; height: 36px; border-radius: 10px; }\n.hb-xg7-orb svg { width: 18px; height: 18px; }\n.hb-xg7-orb svg path:last-child { transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }\n.hb-xg7-zone:hover .hb-xg7-orb { color: #ededed; }\n.hb-xg7[data-over=\"true\"] .hb-xg7-orb { transform: translateY(-5px) scale(1.06); color: var(--hb-xg7-c); }\n.hb-xg7[data-over=\"true\"] .hb-xg7-orb svg path:last-child { transform: translateY(-2px); }\n.hb-xg7-copy { min-width: 0; flex: 1; }\n.hb-xg7-title { margin: 0; font-size: 13.5px; font-weight: 500; }\n.hb-xg7-title u { text-decoration: none; color: var(--hb-xg7-c); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--hb-xg7-c) 50%, transparent); }\n.hb-xg7-hint { margin: 2px 0 0; font-size: 11.5px; color: #6f6f6f; }\n.hb-xg7[data-variant=\"strip\"] .hb-xg7-title, .hb-xg7[data-variant=\"strip\"] .hb-xg7-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.hb-xg7-browse {\n  flex: none;\n  height: 30px;\n  margin: 0;\n  padding: 0 12px;\n  border: 1px solid #2e2e2e;\n  border-radius: 999px;\n  background: linear-gradient(180deg, #1f1f1f, #171717);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);\n  color: #ededed;\n  font: inherit;\n  font-size: 12px;\n  font-weight: 500;\n  pointer-events: none;\n}\n.hb-xg7-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }\n.hb-xg7-row {\n  position: relative;\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  height: 46px;\n  padding: 0 6px 0 8px;\n  border: 1px solid #222;\n  border-radius: 12px;\n  background: #111;\n  overflow: hidden;\n  animation: hb-xg7-row 0.38s cubic-bezier(0.22, 1, 0.36, 1);\n}\n.hb-xg7-row::after {\n  content: \"\";\n  position: absolute;\n  left: 0;\n  bottom: 0;\n  height: 2px;\n  width: calc(var(--hb-xg7-p) * 100%);\n  background: linear-gradient(90deg, color-mix(in srgb, var(--hb-xg7-c) 40%, transparent), var(--hb-xg7-c));\n  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease 0.3s;\n}\n.hb-xg7-row[data-status=\"done\"]::after, .hb-xg7-row[data-status=\"error\"]::after { opacity: 0; }\n.hb-xg7-row[data-status=\"error\"] { border-color: rgba(255, 92, 92, 0.35); background: linear-gradient(90deg, rgba(255, 92, 92, 0.07), #111 60%); animation: hb-xg7-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97); }\n.hb-xg7-doc { position: relative; width: 26px; height: 32px; flex: none; }\n.hb-xg7-doc svg { position: absolute; inset: 0; width: 100%; height: 100%; }\n.hb-xg7-doc span {\n  position: absolute;\n  left: -3px;\n  bottom: 4px;\n  padding: 1px 3px;\n  border-radius: 3px;\n  background: var(--hb-xg7-t);\n  font-family: var(--font-mono), ui-monospace, monospace;\n  font-size: 7.5px;\n  font-weight: 700;\n  line-height: 1.2;\n  color: #fff;\n  text-transform: uppercase;\n}\n.hb-xg7-meta { flex: 1; min-width: 0; line-height: 1.25; }\n.hb-xg7-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }\n.hb-xg7-sub { display: block; font-size: 11px; color: #6f6f6f; font-variant-numeric: tabular-nums; }\n.hb-xg7-row[data-status=\"error\"] .hb-xg7-sub { color: #ff7a7a; }\n.hb-xg7-row[data-status=\"done\"] .hb-xg7-sub { color: #5fd38d; }\n.hb-xg7-state { position: relative; display: grid; place-items: center; width: 22px; height: 22px; flex: none; }\n.hb-xg7-state svg { width: 100%; height: 100%; }\n.hb-xg7-pr { transform: rotate(-90deg); transform-origin: center; }\n.hb-xg7-pr circle { fill: none; stroke-width: 2.2; }\n.hb-xg7-pr circle:last-child { stroke: var(--hb-xg7-c); stroke-linecap: round; transition: stroke-dashoffset 0.25s ease; }\n.hb-xg7-ok { color: #5fd38d; animation: hb-xg7-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }\n.hb-xg7-x {\n  display: grid;\n  place-items: center;\n  width: 26px;\n  height: 26px;\n  flex: none;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: #6f6f6f;\n  cursor: pointer;\n}\n.hb-xg7-x:hover { background: rgba(255, 255, 255, 0.06); color: #ededed; }\n.hb-xg7-x:focus-visible { outline: 2px solid var(--hb-xg7-c); outline-offset: -2px; }\n.hb-xg7-x svg { width: 11px; height: 11px; }\n.hb-xg7-av { display: flex; align-items: center; gap: 16px; }\n.hb-xg7-avz {\n  position: relative;\n  display: grid;\n  place-items: center;\n  width: 88px;\n  height: 88px;\n  flex: none;\n  border-radius: 50%;\n  background: radial-gradient(circle at 50% 30%, #1d1d1d, #101010);\n  cursor: pointer;\n  outline: 0;\n  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n.hb-xg7-avz:focus-visible { box-shadow: 0 0 0 2px #0a0a0a, 0 0 0 4px var(--hb-xg7-c); }\n.hb-xg7[data-over=\"true\"] .hb-xg7-avz { transform: scale(1.05); }\n.hb-xg7-avz .hb-xg7-ants rect { stroke-dasharray: 4 4; }\n.hb-xg7-img { position: absolute; inset: 6px; border-radius: 50%; background-size: cover; background-position: center; }\n.hb-xg7-initials { font-family: var(--font-grotesk), var(--font-sans), sans-serif; font-size: 24px; font-weight: 600; color: #8f8f8f; letter-spacing: 0.02em; }\n.hb-xg7-veil {\n  position: absolute;\n  inset: 6px;\n  display: grid;\n  place-items: center;\n  border-radius: 50%;\n  background: rgba(0, 0, 0, 0.55);\n  color: #fff;\n  font-size: 11px;\n  font-weight: 600;\n  opacity: 0;\n  transition: opacity 0.2s ease;\n}\n.hb-xg7-avz:hover .hb-xg7-veil, .hb-xg7[data-over=\"true\"] .hb-xg7-veil { opacity: 1; }\n.hb-xg7-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }\n.hb-xg7-ring circle { fill: none; stroke: var(--hb-xg7-c); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.25s ease, opacity 0.4s ease; }\n.hb-xg7-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }\n@keyframes hb-xg7-march { to { stroke-dashoffset: -22; } }\n@keyframes hb-xg7-row { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }\n@keyframes hb-xg7-pop { from { transform: scale(0.3); opacity: 0; } }\n@keyframes hb-xg7-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-xg7 *, .hb-xg7 *::after { transition: none !important; animation: none !important; }\n}\n`;\n\nconst typeColors: Record<string, string> = {\n  pdf: \"#e5484d\",\n  png: \"#8e4ec6\",\n  jpg: \"#8e4ec6\",\n  jpeg: \"#8e4ec6\",\n  webp: \"#8e4ec6\",\n  svg: \"#d6409f\",\n  fig: \"#a259ff\",\n  zip: \"#c08532\",\n  csv: \"#30a46c\",\n  xlsx: \"#30a46c\",\n  doc: \"#3e63dd\",\n  docx: \"#3e63dd\",\n  mp4: \"#e54666\",\n  mov: \"#e54666\",\n  txt: \"#6f6f6f\",\n  md: \"#6f6f6f\",\n};\n\nfunction extOf(name: string) {\n  const i = name.lastIndexOf(\".\");\n  return i > 0 ? name.slice(i + 1).toLowerCase() : \"file\";\n}\n\nfunction bytes(n: number) {\n  if (n < 1024) return `${n} B`;\n  if (n < 1024 * 1024) return `${(n / 1024).toFixed(0)} KB`;\n  return `${(n / 1024 / 1024).toFixed(1)} MB`;\n}\n\nfunction hash(s: string) {\n  let h = 2166136261;\n  for (let i = 0; i < s.length; i++) h = Math.imul(h ^ s.charCodeAt(i), 16777619);\n  return h >>> 0;\n}\n\nfunction accepts(file: File, accept?: string) {\n  if (!accept) return true;\n  const list = accept.split(\",\").map((a) => a.trim().toLowerCase()).filter(Boolean);\n  const name = file.name.toLowerCase();\n  const type = file.type.toLowerCase();\n  return list.some((a) =>\n    a.startsWith(\".\") ? name.endsWith(a) : a.endsWith(\"/*\") ? type.startsWith(a.slice(0, -1)) : type === a,\n  );\n}\n\nfunction Ants({ radius }: { radius: number | \"50%\" }) {\n  return (\n    <svg className=\"hb-xg7-ants\" aria-hidden=\"true\">\n      <rect x=\"0.75\" y=\"0.75\" rx={radius} ry={radius} style={{ width: \"calc(100% - 1.5px)\", height: \"calc(100% - 1.5px)\" }} />\n    </svg>\n  );\n}\n\nfunction UploadIcon() {\n  return (\n    <svg viewBox=\"0 0 18 18\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      <path d=\"M3 11.5v1.8A1.7 1.7 0 0 0 4.7 15h8.6a1.7 1.7 0 0 0 1.7-1.7v-1.8\" />\n      <path d=\"M9 11V3.2M5.8 6.2L9 3l3.2 3.2\" />\n    </svg>\n  );\n}\n\nexport function InputFileDrop({\n  variant = \"panel\",\n  accept,\n  maxSize = 10 * 1024 * 1024,\n  multiple = true,\n  title,\n  hint,\n  defaultItems = [],\n  onFilesChange,\n  onUpload,\n  accent = \"#2f7bff\",\n  disabled = false,\n  className = \"\",\n  style,\n  ...rest\n}: InputFileDropProps) {\n  const id = React.useId();\n  const inputRef = React.useRef<HTMLInputElement>(null);\n  const depth = React.useRef(0);\n  const counter = React.useRef(0);\n  const [items, setItems] = React.useState<InputFileDropItem[]>(defaultItems);\n  const [over, setOver] = React.useState(false);\n  const itemsRef = React.useRef(items);\n  const changeRef = React.useRef(onFilesChange);\n\n  React.useEffect(() => {\n    itemsRef.current = items;\n  }, [items]);\n\n  React.useEffect(() => {\n    changeRef.current = onFilesChange;\n  }, [onFilesChange]);\n\n  const mounted = React.useRef(false);\n\n  React.useEffect(() => {\n    if (!mounted.current) {\n      mounted.current = true;\n      return;\n    }\n    changeRef.current?.(items);\n  }, [items]);\n\n  const update = React.useCallback((fn: (prev: InputFileDropItem[]) => InputFileDropItem[]) => {\n    setItems(fn);\n  }, []);\n\n  const uploading = items.some((i) => i.status === \"uploading\" && !i.file);\n\n  React.useEffect(() => {\n    if (!uploading) return;\n    let tick = 0;\n    const t = window.setInterval(() => {\n      tick++;\n      update((prev) =>\n        prev.map((it) => {\n          if (it.status !== \"uploading\" || it.file) return it;\n          const step = 0.015 + (hash(`${it.id}:${tick}`) % 100) / 2200;\n          const p = Math.min(1, it.progress + step);\n          return { ...it, progress: p, status: p >= 1 ? \"done\" : \"uploading\" };\n        }),\n      );\n    }, 200);\n    return () => window.clearInterval(t);\n  }, [uploading, update]);\n\n  React.useEffect(() => {\n    return () => {\n      for (const it of itemsRef.current) if (it.preview) URL.revokeObjectURL(it.preview);\n    };\n  }, []);\n\n  function add(list: FileList | File[]) {\n    const files = Array.from(list);\n    if (!files.length) return;\n    const chosen = variant === \"avatar\" || !multiple ? files.slice(0, 1) : files;\n    const fresh: InputFileDropItem[] = chosen.map((f) => {\n      counter.current += 1;\n      const tooBig = f.size > maxSize;\n      const wrong = !accepts(f, accept);\n      const isImage = f.type.startsWith(\"image/\");\n      return {\n        id: `${id}-${counter.current}`,\n        name: f.name,\n        size: f.size,\n        type: f.type,\n        progress: 0,\n        status: tooBig || wrong ? \"error\" : \"uploading\",\n        error: wrong ? \"File type not allowed\" : tooBig ? `Larger than ${bytes(maxSize)}` : undefined,\n        file: onUpload ? f : undefined,\n        preview: isImage && !tooBig && !wrong ? URL.createObjectURL(f) : undefined,\n      };\n    });\n    if (variant === \"avatar\" || !multiple) {\n      for (const it of itemsRef.current) if (it.preview) URL.revokeObjectURL(it.preview);\n      update(() => fresh);\n    } else update((prev) => [...prev, ...fresh]);\n    if (onUpload) {\n      fresh.forEach((it, k) => {\n        if (it.status !== \"uploading\") return;\n        onUpload(chosen[k], (p) =>\n          update((prev) => prev.map((x) => (x.id === it.id ? { ...x, progress: Math.max(0, Math.min(1, p)) } : x))),\n        )\n          .then(() => update((prev) => prev.map((x) => (x.id === it.id ? { ...x, progress: 1, status: \"done\" } : x))))\n          .catch((err: unknown) =>\n            update((prev) =>\n              prev.map((x) =>\n                x.id === it.id ? { ...x, status: \"error\", error: err instanceof Error ? err.message : \"Upload failed\" } : x,\n              ),\n            ),\n          );\n      });\n    }\n  }\n\n  function remove(target: InputFileDropItem) {\n    if (target.preview) URL.revokeObjectURL(target.preview);\n    update((prev) => prev.filter((x) => x.id !== target.id));\n  }\n\n  const zoneEvents = {\n    role: \"button\" as const,\n    tabIndex: disabled ? -1 : 0,\n    \"aria-describedby\": `${id}-hint`,\n    onClick: () => inputRef.current?.click(),\n    onKeyDown: (e: React.KeyboardEvent) => {\n      if (e.key === \"Enter\" || e.key === \" \") {\n        e.preventDefault();\n        inputRef.current?.click();\n      }\n    },\n    onPaste: (e: React.ClipboardEvent) => {\n      if (e.clipboardData.files.length) {\n        e.preventDefault();\n        add(e.clipboardData.files);\n      }\n    },\n    onDragEnter: (e: React.DragEvent) => {\n      e.preventDefault();\n      depth.current += 1;\n      setOver(true);\n    },\n    onDragOver: (e: React.DragEvent) => {\n      e.preventDefault();\n      e.dataTransfer.dropEffect = \"copy\";\n    },\n    onDragLeave: () => {\n      depth.current = Math.max(0, depth.current - 1);\n      if (depth.current === 0) setOver(false);\n    },\n    onDrop: (e: React.DragEvent) => {\n      e.preventDefault();\n      depth.current = 0;\n      setOver(false);\n      add(e.dataTransfer.files);\n    },\n  };\n\n  const typeHint = hint ?? `${accept ? accept.replace(/,/g, \", \").replace(/image\\/\\*/g, \"Images\").toUpperCase() : \"Any file\"} up to ${bytes(maxSize)}`;\n  const vars = { \"--hb-xg7-c\": accent, ...style } as React.CSSProperties;\n  const input = (\n    <input\n      ref={inputRef}\n      id={`${id}-in`}\n      className=\"hb-xg7-input\"\n      type=\"file\"\n      accept={variant === \"avatar\" ? accept ?? \"image/*\" : accept}\n      multiple={variant !== \"avatar\" && multiple}\n      tabIndex={-1}\n      aria-hidden=\"true\"\n      disabled={disabled}\n      onChange={(e) => {\n        if (e.target.files) add(e.target.files);\n        e.target.value = \"\";\n      }}\n    />\n  );\n\n  if (variant === \"avatar\") {\n    const it = items[0];\n    const p = it?.status === \"uploading\" ? it.progress : it?.status === \"done\" ? 1 : 0;\n    const c = 2 * Math.PI * 42;\n    return (\n      <div className={`hb-xg7 ${className}`} style={vars} data-variant={variant} data-over={over} data-disabled={disabled} {...rest}>\n        <style href=\"hb-input-file-drop\" precedence=\"default\">{css}</style>\n        <div className=\"hb-xg7-av\">\n          <div className=\"hb-xg7-avz\" aria-label={it ? \"Replace photo\" : \"Upload photo\"} {...zoneEvents}>\n            <Ants radius=\"50%\" />\n            {it?.preview ? <span className=\"hb-xg7-img\" style={{ backgroundImage: `url(${it.preview})` }} /> : <span className=\"hb-xg7-initials\">{(title ?? \"Avery Lin\").split(\" \").map((w) => w[0]).join(\"\").slice(0, 2)}</span>}\n            <span className=\"hb-xg7-veil\" aria-hidden=\"true\">\n              {it ? \"Replace\" : \"Upload\"}\n            </span>\n            <svg className=\"hb-xg7-ring\" viewBox=\"0 0 88 88\" aria-hidden=\"true\">\n              <circle cx=\"44\" cy=\"44\" r=\"42\" strokeDasharray={c.toFixed(2)} strokeDashoffset={(c * (1 - p)).toFixed(2)} style={{ opacity: it?.status === \"uploading\" ? 1 : 0 }} />\n            </svg>\n          </div>\n          <div className=\"hb-xg7-copy\">\n            <p className=\"hb-xg7-title\">{title ?? \"Avery Lin\"}</p>\n            <p className=\"hb-xg7-hint\" id={`${id}-hint`} aria-live=\"polite\">\n              {it?.status === \"error\"\n                ? it.error\n                : it?.status === \"uploading\"\n                  ? `Uploading ${Math.round(it.progress * 100)}%`\n                  : it?.status === \"done\"\n                    ? \"Photo updated\"\n                    : hint ?? \"Drop a square photo, PNG or JPG up to 5 MB\"}\n            </p>\n          </div>\n        </div>\n        {input}\n      </div>\n    );\n  }\n\n  return (\n    <div className={`hb-xg7 ${className}`} style={vars} data-variant={variant} data-over={over} data-disabled={disabled} {...rest}>\n      <style href=\"hb-input-file-drop\" precedence=\"default\">{css}</style>\n      <div className=\"hb-xg7-zone\" aria-label=\"Upload files\" {...zoneEvents}>\n        <Ants radius={16} />\n        <span className=\"hb-xg7-orb\">\n          <UploadIcon />\n        </span>\n        <div className=\"hb-xg7-copy\">\n          <p className=\"hb-xg7-title\">\n            {over ? \"Release to upload\" : title ?? (\n              <>\n                Drop files here or <u>browse</u>\n              </>\n            )}\n          </p>\n          <p className=\"hb-xg7-hint\" id={`${id}-hint`}>\n            {typeHint}\n          </p>\n        </div>\n        {variant === \"strip\" && (\n          <span className=\"hb-xg7-browse\" aria-hidden=\"true\">\n            Choose files\n          </span>\n        )}\n      </div>\n      {input}\n      {items.length > 0 && (\n        <ul className=\"hb-xg7-list\" aria-label=\"Files\">\n          {items.map((it) => {\n            const ext = extOf(it.name);\n            const c = 2 * Math.PI * 8;\n            return (\n              <li\n                key={it.id}\n                className=\"hb-xg7-row\"\n                data-status={it.status}\n                style={{ \"--hb-xg7-p\": it.progress.toFixed(3), \"--hb-xg7-t\": typeColors[ext] ?? \"#5b5b5b\" } as React.CSSProperties}\n              >\n                <span className=\"hb-xg7-doc\" aria-hidden=\"true\">\n                  <svg viewBox=\"0 0 26 32\" fill=\"none\">\n                    <path d=\"M4 1.5h12.5L23.5 8.5V28a2.5 2.5 0 0 1-2.5 2.5H4A2.5 2.5 0 0 1 1.5 28V4A2.5 2.5 0 0 1 4 1.5z\" fill=\"#1b1b1b\" stroke=\"#333\" />\n                    <path d=\"M16.5 1.5V7a1.5 1.5 0 0 0 1.5 1.5h5.5\" stroke=\"#333\" />\n                  </svg>\n                  <span>{ext.slice(0, 4)}</span>\n                </span>\n                <span className=\"hb-xg7-meta\">\n                  <span className=\"hb-xg7-name\">{it.name}</span>\n                  <span className=\"hb-xg7-sub\">\n                    {it.status === \"error\"\n                      ? it.error\n                      : it.status === \"done\"\n                        ? `${bytes(it.size)} · Uploaded`\n                        : `${bytes(Math.round(it.size * it.progress))} of ${bytes(it.size)} · ${Math.round(it.progress * 100)}%`}\n                  </span>\n                </span>\n                <span className=\"hb-xg7-state\" aria-hidden=\"true\">\n                  {it.status === \"uploading\" ? (\n                    <svg className=\"hb-xg7-pr\" viewBox=\"0 0 22 22\">\n                      <circle cx=\"11\" cy=\"11\" r=\"8\" stroke=\"#262626\" />\n                      <circle cx=\"11\" cy=\"11\" r=\"8\" strokeDasharray={c.toFixed(2)} strokeDashoffset={(c * (1 - it.progress)).toFixed(2)} />\n                    </svg>\n                  ) : it.status === \"done\" ? (\n                    <svg className=\"hb-xg7-ok\" viewBox=\"0 0 22 22\" fill=\"none\">\n                      <circle cx=\"11\" cy=\"11\" r=\"9\" fill=\"currentColor\" opacity=\"0.16\" />\n                      <path d=\"M7 11.3l2.7 2.7L15 8.6\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                    </svg>\n                  ) : (\n                    <svg viewBox=\"0 0 22 22\" fill=\"none\" style={{ color: \"#ff6b6b\" }}>\n                      <circle cx=\"11\" cy=\"11\" r=\"9\" fill=\"currentColor\" opacity=\"0.16\" />\n                      <path d=\"M11 6.8v5M11 15v.2\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n                    </svg>\n                  )}\n                </span>\n                <button type=\"button\" className=\"hb-xg7-x\" aria-label={`Remove ${it.name}`} onClick={() => remove(it)}>\n                  <svg viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" aria-hidden=\"true\">\n                    <path d=\"M3 3l6 6M9 3l-6 6\" strokeLinecap=\"round\" />\n                  </svg>\n                </button>\n              </li>\n            );\n          })}\n        </ul>\n      )}\n    </div>\n  );\n}\n"
    }
  ]
}