{
  "format": "ui-contract-stories/1",
  "componentId": "shadcn:Attachment",
  "purpose": "Source-independent reusable semantic fixtures. Static HTML specifies expected anatomy/state; actual pinned React adapter and protocol cases separately establish behavior.",
  "stories": [
    {
      "id": "state-idle",
      "name": "State idle",
      "inputs": {
        "state": "idle"
      },
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"idle\" data-size=\"default\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Ready to attach.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf: idle.</p>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "state-uploading",
      "name": "State uploading",
      "inputs": {
        "state": "uploading"
      },
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"uploading\" data-size=\"default\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Uploading report.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\" disabled=\"\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf: uploading.</p>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "state-processing",
      "name": "State processing",
      "inputs": {
        "state": "processing"
      },
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"processing\" data-size=\"default\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Processing report.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\" disabled=\"\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf: processing.</p>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "state-error",
      "name": "State error",
      "inputs": {
        "state": "error"
      },
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"error\" data-size=\"default\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Upload failed. Check the connection and retry.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf upload failed.</p>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "state-done",
      "name": "State done",
      "inputs": {
        "state": "done"
      },
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"done\" data-size=\"default\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">PDF · 2 MB</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf: done.</p>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "size-sm",
      "name": "Size sm",
      "inputs": {
        "size": "sm"
      },
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"error\" data-size=\"sm\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Upload failed. Check the connection and retry.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf upload failed.</p>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "size-xs",
      "name": "Size xs",
      "inputs": {
        "size": "xs"
      },
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"error\" data-size=\"xs\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Upload failed. Check the connection and retry.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf upload failed.</p>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "vertical-thumbnail",
      "name": "Vertical thumbnail",
      "inputs": {
        "orientation": "vertical",
        "media": {
          "variant": "image"
        }
      },
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"done\" data-size=\"default\" data-orientation=\"vertical\"><div data-slot=\"attachment-media\" data-variant=\"image\"><img src=\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Crect%20width%3D%2232%22%20height%3D%2232%22%20fill%3D%22%23c7e8ff%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2212%22%20r%3D%226%22%20fill%3D%22%23345%22%2F%3E%3Cpath%20d%3D%22M4%2032a12%2012%200%200%201%2024%200%22%20fill%3D%22%23345%22%2F%3E%3C%2Fsvg%3E\" alt=\"\"/></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">PDF · 2 MB</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf: done.</p>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "group",
      "name": "Group",
      "inputs": {},
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment-group\" role=\"group\" aria-label=\"Attached files\"><div data-slot=\"attachment\" data-state=\"done\" data-size=\"default\" data-orientation=\"vertical\"><div data-slot=\"attachment-media\" data-variant=\"image\"><img src=\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Crect%20width%3D%2232%22%20height%3D%2232%22%20fill%3D%22%23c7e8ff%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2212%22%20r%3D%226%22%20fill%3D%22%23345%22%2F%3E%3Cpath%20d%3D%22M4%2032a12%2012%200%200%201%2024%200%22%20fill%3D%22%23345%22%2F%3E%3C%2Fsvg%3E\" alt=\"\"/></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">PDF · 2 MB</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><div data-slot=\"attachment\" data-state=\"idle\" data-size=\"default\" data-orientation=\"vertical\"><div data-slot=\"attachment-media\" data-variant=\"image\"><img src=\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Crect%20width%3D%2232%22%20height%3D%2232%22%20fill%3D%22%23c7e8ff%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2212%22%20r%3D%226%22%20fill%3D%22%23345%22%2F%3E%3Cpath%20d%3D%22M4%2032a12%2012%200%200%201%2024%200%22%20fill%3D%22%23345%22%2F%3E%3C%2Fsvg%3E\" alt=\"\"/></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Ready to attach.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div></div>"
      },
      "steps": [],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "hovered",
      "name": "Hovered",
      "inputs": {},
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"error\" data-size=\"default\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Upload failed. Check the connection and retry.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf upload failed.</p>"
      },
      "steps": [
        {
          "action": "hover",
          "part": "root"
        }
      ],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    },
    {
      "id": "trigger-focus",
      "name": "Trigger focus",
      "inputs": {},
      "visualState": "default",
      "fixture": {
        "html": "<div data-slot=\"attachment\" data-state=\"error\" data-size=\"default\" data-orientation=\"horizontal\"><div data-slot=\"attachment-media\" data-variant=\"icon\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M6 2h8l4 4v16H6z\" fill=\"none\" stroke=\"currentColor\"/></svg></div><div data-slot=\"attachment-content\"><span data-slot=\"attachment-title\">annual-report.pdf</span><span data-slot=\"attachment-description\">Upload failed. Check the connection and retry.</span></div><button type=\"button\" data-slot=\"attachment-trigger\" aria-label=\"Open annual-report.pdf\"></button><div data-slot=\"attachment-actions\"><button type=\"button\" data-slot=\"attachment-action\" class=\"cn-button cn-button-variant-ghost cn-button-size-icon-xs\" aria-describedby=\"code-help\" aria-label=\"Retry annual-report.pdf\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 10a8 8 0 1 1 1 9M4 4v6h6\" fill=\"none\" stroke=\"currentColor\"/></svg></button></div></div><p role=\"status\">annual-report.pdf upload failed.</p>"
      },
      "steps": [
        {
          "action": "focus",
          "part": "trigger",
          "keyboard": true
        }
      ],
      "expectation": "Actual source slots, public variants and caller-provided meaning match the fixture; lifecycle changes are checked separately through the real source target."
    }
  ]
}
