{
  "component": {
    "id": "dialog",
    "name": "Dialog",
    "tier": "pro",
    "exampleId": "dialog",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/core-demos.tsx",
    "exportName": "DialogDemo",
    "sha256": "a986a439366e9d123700f6cf74990b0b9919dec04a17d327cafeaacb2426a702",
    "helperImports": [],
    "directComponentImports": [
      "dialog",
      "form-field",
      "tidal-button"
    ],
    "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/dialog",
    "registryUrl": "https://tidalui.com/r/pro/dialog.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/dialog",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/dialog",
      "registryUrl": "https://tidalui.com/r/pro/dialog.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    },
    {
      "order": 2,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/form-field.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/form-field.json",
      "registryUrl": "https://tidalui.com/r/form-field.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/dialog.tsx",
    "exports": [
      "TidalButton",
      "TidalDialog",
      "TidalField"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/dialog.css",
      "components/ui/form-field.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "@radix-ui/react-dialog",
      "lucide-react"
    ],
    "registry": [
      "https://tidalui.com/r/tidal-button.json"
    ],
    "additionalRegistry": [
      "https://tidalui.com/r/form-field.json"
    ],
    "installClosure": [
      "dialog",
      "form-field",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/dialog.css",
      "components/ui/form-field.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/dialog.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/demo-styles.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState, useRef, useId } from \"react\";\n\nimport { Plus } from \"lucide-react\";\n\nimport { TidalDialog } from \"./components/ui/dialog\";\n\nimport \"./components/ui/dialog.css\";\n\nimport { TidalField } from \"./components/ui/form-field\";\n\nimport \"./components/ui/form-field.css\";\n\nimport { TidalButton } from \"./components/ui/tidal-button\";\n\n\n\nconst tidalExampleStyles = \".dialog-specimen{width:100%;max-width:330px;text-align:center;color:var(--t-ink)}.dialog-specimen>.demo-eyebrow{display:block;margin:20px 0 12px;font-size:11px}.dialog-specimen>h3{font-size:23px;letter-spacing:-.9px}.dialog-specimen>p{font-size:11px;color:var(--t-muted);margin:9px 0 22px}.dialog-specimen>.dialog-demo-status{font-size:11px;margin-top:19px;margin-bottom:0}.workspace-illustration{height:73px;width:88px;position:relative;margin:auto}.workspace-illustration>span{position:absolute;width:66px;height:48px;border:1px solid var(--t-border);border-radius:9px;background:var(--t-surface);box-shadow:0 7px 15px #1f1f1f08;top:22px;left:20px;transform:rotate(8deg)}.workspace-illustration>span:nth-child(2){top:11px;left:10px;transform:rotate(-5deg);background:var(--t-wash)}.workspace-illustration>span:nth-child(3){top:0;left:0;transform:rotate(-12deg);background:var(--t-surface)}.workspace-illustration>span:before{content:\\\"\\\";position:absolute;inset:12px 12px auto;height:4px;background:var(--t-border);border-radius:2px;box-shadow:0 9px var(--t-border)}\\n\\n.workspace-illustration>span{transition:transform 420ms var(--t-ease-out),box-shadow 420ms var(--t-ease-out)}\\n.dialog-specimen:hover .workspace-illustration>span:first-child,.dialog-specimen:focus-within .workspace-illustration>span:first-child{transform:translate(4px,3px) rotate(14deg)}\\n.dialog-specimen:hover .workspace-illustration>span:nth-child(3),.dialog-specimen:focus-within .workspace-illustration>span:nth-child(3){transform:translate(-4px,-3px) rotate(-16deg)}\\n@media(prefers-reduced-motion:reduce){.dialog-specimen:hover .workspace-illustration>span:first-child,.dialog-specimen:focus-within .workspace-illustration>span:first-child{transform:rotate(8deg)}.dialog-specimen:hover .workspace-illustration>span:nth-child(3),.dialog-specimen:focus-within .workspace-illustration>span:nth-child(3){transform:rotate(-12deg)}}\";\n\nexport function DialogDemo({ theme = \"light\" }: { theme?: \"light\" | \"dark\" }) {\n  const [open, setOpen] = useState(false);\n  const [name, setName] = useState(\"\");\n  const [error, setError] = useState(\"\");\n  const [created, setCreated] = useState(\"\");\n  const field = useRef<HTMLInputElement>(null);\n  const formId = useId();\n  return (\n    <div className=\"dialog-specimen\">\n      <div className=\"workspace-illustration\" aria-hidden=\"true\">\n        <span />\n        <span />\n        <span />\n      </div>\n\n      <TidalDialog\n        theme={theme}\n        open={open}\n        onOpenChange={(value) => {\n          setOpen(value);\n          if (!value) setError(\"\");\n        }}\n        title=\"Create workspace\"\n        description=\"Enter a name for this sample workspace.\"\n        trigger={\n          <TidalButton>\n            <Plus size={15} aria-hidden=\"true\" />\n            Create workspace\n          </TidalButton>\n        }\n        footer={\n          <>\n            <TidalButton variant=\"secondary\" onClick={() => setOpen(false)}>\n              Cancel\n            </TidalButton>\n            <TidalButton type=\"submit\" form={formId}>\n              Create workspace\n            </TidalButton>\n          </>\n        }\n      >\n        <form\n          id={formId}\n          noValidate\n          onSubmit={(e) => {\n            e.preventDefault();\n            if (!name.trim()) {\n              setError(\"Give your workspace a name.\");\n              field.current?.focus({ preventScroll: true });\n              return;\n            }\n            setCreated(name.trim());\n            setOpen(false);\n            setError(\"\");\n            setName(\"\");\n          }}\n        >\n          <TidalField\n            ref={field}\n            label=\"Workspace name\"\n            required\n            value={name}\n            onChange={(e) => {\n              setName(e.target.value);\n              setError(\"\");\n            }}\n            placeholder=\"e.g. Northstar Studio\"\n            error={error}\n          />\n        </form>\n      </TidalDialog>\n      <p className=\"dialog-demo-status\" role=\"status\">\n        {created\n          ? created + \" created. Sample workspace only.\"\n          : \"Create a sample workspace.\"}\n      </p>\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      <DialogDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/dialog.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "open",
      "type": "inferred-from-existing-demo",
      "initial": "false",
      "setter": "setOpen",
      "proposalCanBeRejected": false
    },
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "\"\"",
      "setter": "setName",
      "proposalCanBeRejected": false
    },
    {
      "prop": "error",
      "type": "inferred-from-existing-demo",
      "initial": "\"\"",
      "setter": "setError",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onChange",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": false,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": false,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onOpenChange",
      "nativeType": "component callback",
      "callerFirst": false,
      "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": false,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "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": "Existing demo label or ARIA prop",
    "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": "Verify focus returns to the invoking control after dismissal.",
    "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": []
}
