{
  "component": {
    "id": "customer-profile",
    "name": "Customer profile",
    "tier": "pro",
    "exampleId": "customer-profile",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/customer-profile-demo.tsx",
    "exportName": "CustomerProfileDemo",
    "sha256": "f25b812dc2d4a52f4870f7523264b827acb802e0702266f5cd03a3cf80acce26",
    "helperImports": [],
    "directComponentImports": [
      "customer-profile"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/customer-profile",
    "registryUrl": "https://tidalui.com/r/pro/customer-profile.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/customer-profile",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/customer-profile",
      "registryUrl": "https://tidalui.com/r/pro/customer-profile.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/customer-profile.tsx",
    "exports": [
      "TidalCustomerAction",
      "TidalCustomerProfile"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/customer-profile.css",
      "components/ui/status-badge.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [
      "https://tidalui.com/r/status-badge.json"
    ],
    "additionalRegistry": [],
    "installClosure": [
      "customer-profile",
      "status-badge"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/customer-profile.css",
      "components/ui/status-badge.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/customer-profile.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/customer-profile-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useId, useState, type MouseEvent } from \"react\";\n\nimport { TidalCustomerProfile, type TidalCustomerAction } from \"./components/ui/customer-profile\";\n\nimport \"./components/ui/customer-profile.css\";\n\nimport \"./components/ui/status-badge.css\";\n\nfunction tidalExampleAvatarDataUri(seed: unknown) {\n  const text = String(seed).replace(/[^a-z0-9]/gi, \"\").slice(-2) || \"UI\";\n  const palette = [\"#333333\", \"#555555\", \"#777777\", \"#999999\", \"#bbbbbb\"];\n  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" rx=\"48\" fill=\"${color}\"/><circle cx=\"48\" cy=\"38\" r=\"17\" fill=\"white\" fill-opacity=\".92\"/><path d=\"M18 92c3-22 15-34 30-34s27 12 30 34\" fill=\"white\" fill-opacity=\".92\"/></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nfunction tidalExampleImageDataUri(label: string) {\n  const safeLabel = label.replace(/[<>&]/g, \"\").slice(0, 28) || \"Sample image\";\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1200 675\"><defs><linearGradient id=\"g\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\"><stop stop-color=\"#171717\"/><stop offset=\"1\" stop-color=\"#555555\"/></linearGradient></defs><rect width=\"1200\" height=\"675\" fill=\"url(#g)\"/><circle cx=\"950\" cy=\"100\" r=\"260\" fill=\"white\" fill-opacity=\".08\"/><text x=\"80\" y=\"570\" fill=\"white\" font-family=\"system-ui,sans-serif\" font-size=\"64\" font-weight=\"700\">${safeLabel}</text></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nconst tidalExampleStyles = \".tidal-scope .customer-profile-demo {\\n  display: grid;\\n  width: 100%;\\n  max-width: 980px;\\n  min-width: 0;\\n  gap: 13px;\\n}\\n\\n.customer-profile-demo-status {\\n  min-width: 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n  text-align: center;\\n  overflow-wrap: anywhere;\\n}\";\n\nfunction isPlainPrimaryClick(event: MouseEvent<HTMLAnchorElement>) {\n  return (\n    event.button === 0 &&\n    !event.metaKey &&\n    !event.ctrlKey &&\n    !event.shiftKey &&\n    !event.altKey\n  );\n}\n\nexport function CustomerProfileDemo() {\n  const generatedId = useId().replace(/:/g, \"\");\n  const noteId = `${generatedId}-customer-note`;\n  const [noteDraft, setNoteDraft] = useState(\n    \"Follow up after the workspace review.\",\n  );\n  const [savedNote, setSavedNote] = useState(\n    \"The team is reviewing editor access for two new teammates.\",\n  );\n  const [reviewed, setReviewed] = useState(false);\n  const [status, setStatus] = useState(\n    \"Fictional local customer record. Changes stay on this page.\",\n  );\n\n  const actions: readonly TidalCustomerAction[] = [\n    {\n      id: \"workspace\",\n      kind: \"link\",\n      label: \"Open workspace\",\n      href: \"#sample-customer-workspace\",\n      linkProps: {\n        onClick: (event: import(\"react\").MouseEvent<HTMLAnchorElement>) => {\n          if (!isPlainPrimaryClick(event)) return;\n          event.preventDefault();\n          setStatus(\"Workspace selected in this local sample.\");\n        },\n      },\n    },\n    {\n      id: \"review\",\n      kind: \"button\",\n      label: reviewed ? \"Clear review\" : \"Mark for review\",\n      onAction: () => {\n        setReviewed((current) => !current);\n        setStatus(\n          reviewed\n            ? \"Review marker cleared locally.\"\n            : \"Customer marked for local review.\",\n        );\n      },\n    },\n  ];\n\n  return (\n    <div className=\"customer-profile-demo\">\n      <TidalCustomerProfile\n        customer={{\n          name: \"Leah Kim\",\n          company: \"Northline Studio\",\n          detail: \"Customer since March 2026\",\n          imageSrc: tidalExampleAvatarDataUri(\"07\"),\n        }}\n        health={{\n          label: reviewed ? \"Needs review\" : \"On track\",\n          status: reviewed ? \"warning\" : \"success\",\n          announce: true,\n        }}\n        plan={{ name: \"Studio\", detail: \"12 seats\" }}\n        contacts={[\n          {\n            id: \"email\",\n            label: \"Email\",\n            value: \"leah@example.invalid\",\n            href: \"mailto:leah@example.invalid\",\n            linkProps: {\n              onClick: (event: import(\"react\").MouseEvent<HTMLAnchorElement>) => {\n                if (!isPlainPrimaryClick(event)) return;\n                event.preventDefault();\n                setStatus(\"Email destination selected. No message was sent.\");\n              },\n            },\n          },\n          {\n            id: \"phone\",\n            label: \"Phone\",\n            value: \"+1 555 014 0182\",\n            href: \"tel:+15550140182\",\n            linkProps: {\n              onClick: (event: import(\"react\").MouseEvent<HTMLAnchorElement>) => {\n                if (!isPlainPrimaryClick(event)) return;\n                event.preventDefault();\n                setStatus(\"Phone destination selected. No call was started.\");\n              },\n            },\n          },\n        ]}\n        fields={[\n          { id: \"owner\", label: \"Owner\", value: \"Mila Chen\" },\n          { id: \"region\", label: \"Region\", value: \"Central\" },\n          { id: \"renewal\", label: \"Review date\", value: \"November 18\" },\n        ]}\n        actions={actions}\n        note={<p>{savedNote}</p>}\n        noteEditor={\n          <form\n            onSubmit={(event) => {\n              event.preventDefault();\n              const next = noteDraft.trim();\n              if (!next) {\n                setStatus(\"Enter a note before saving.\");\n                return;\n              }\n              setSavedNote(next);\n              setStatus(\"Note saved in this local sample.\");\n            }}\n            onReset={() => {\n              setNoteDraft(savedNote);\n              setStatus(\"Note edit reset locally.\");\n            }}\n          >\n            <label htmlFor={noteId}>\n              <span>Edit note</span>\n              <textarea\n                id={noteId}\n                name=\"customerNote\"\n                value={noteDraft}\n                onChange={(event) => setNoteDraft(event.currentTarget.value)}\n                required\n              />\n            </label>\n            <div>\n              <button type=\"submit\">Save note</button>\n              <button type=\"reset\">Reset</button>\n            </div>\n          </form>\n        }\n        activity={[\n          {\n            id: \"note\",\n            title: \"Account note updated\",\n            description: \"Editor access is under review.\",\n            actor: \"Mila Chen\",\n            time: \"Today, 10:24 AM\",\n            dateTime: \"2026-10-15T10:24:00-05:00\",\n          },\n          {\n            id: \"seat\",\n            title: \"Seat count changed\",\n            description: \"The local record moved from 10 to 12 seats.\",\n            actor: \"Noah Reed\",\n            time: \"Yesterday\",\n            dateTime: \"2026-10-14\",\n          },\n          {\n            id: \"review\",\n            title: \"Workspace review scheduled\",\n            actor: \"Leah Kim\",\n            time: \"October 8\",\n            dateTime: \"2026-10-08\",\n          },\n        ]}\n      />\n      <output className=\"customer-profile-demo-status\" aria-live=\"polite\">\n        {status}\n      </output>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <CustomerProfileDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/customer-profile.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "\"Follow up after the workspace review.\",",
      "setter": "setNoteDraft",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onChange",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onReset",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onSubmit",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [
      "customerNote"
    ],
    "expectedFormData": {
      "customerNote": "fixture value"
    },
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Consumer-provided label remains required where the component API requires one.",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "The existing error or alert path remains consumer-owned and should be announced by the rendered semantics.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
