{
  "component": {
    "id": "alert-dialog",
    "name": "Alert dialog",
    "tier": "pro",
    "exampleId": "alert-dialog",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/alert-dialog-demo.tsx",
    "exportName": "AlertDialogDemo",
    "sha256": "5666f516046a7e6a6d52da504dd33abecf1948b217bce4da79696042106a2060",
    "helperImports": [],
    "directComponentImports": [
      "alert-dialog"
    ],
    "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/alert-dialog",
    "registryUrl": "https://tidalui.com/r/pro/alert-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/alert-dialog",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/alert-dialog",
      "registryUrl": "https://tidalui.com/r/pro/alert-dialog.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/alert-dialog.tsx",
    "exports": [
      "TidalAlertDialog"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/alert-dialog.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "@radix-ui/react-dialog"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "alert-dialog"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/alert-dialog.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/alert-dialog.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/alert-dialog-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useRef, useState } from \"react\";\n\nimport { TidalAlertDialog } from \"./components/ui/alert-dialog\";\n\nimport \"./components/ui/alert-dialog.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .alert-dialog-demo,\\n.tidal-scope .alert-dialog-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .alert-dialog-demo {\\n  display: grid;\\n  width: min(100%, 620px);\\n  min-width: 0;\\n  gap: 12px;\\n  margin-inline: auto;\\n}\\n\\n.tidal-scope .alert-dialog-demo-card {\\n  display: flex;\\n  min-width: 0;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 22px;\\n  padding: 20px;\\n  color: var(--t-ink);\\n  background: var(--t-surface);\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  box-shadow: 0 22px 48px -42px #0000008f;\\n}\\n\\n.tidal-scope .alert-dialog-demo-card > div {\\n  display: grid;\\n  min-width: 0;\\n  gap: 4px;\\n}\\n\\n.tidal-scope .alert-dialog-demo-card span {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  font-weight: 720;\\n  letter-spacing: 0.09em;\\n  line-height: 1.35;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .alert-dialog-demo-card strong {\\n  font-size: 18px;\\n  font-weight: 650;\\n  letter-spacing: -0.025em;\\n  line-height: 1.25;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .alert-dialog-demo-card small {\\n  color: var(--t-muted);\\n  font-size: 12px;\\n  line-height: 1.4;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .alert-dialog-demo-card[data-removed=\\\"true\\\"] {\\n  border-style: dashed;\\n}\\n\\n.tidal-scope .alert-dialog-demo-trigger {\\n  display: inline-flex;\\n  min-width: 0;\\n  min-height: 44px;\\n  flex: 0 0 auto;\\n  align-items: center;\\n  justify-content: center;\\n  padding: 10px 15px;\\n  color: var(--t-surface);\\n  background: var(--t-ink);\\n  border: 1px solid var(--t-ink);\\n  border-radius: 10px;\\n  font: inherit;\\n  font-size: 13px;\\n  font-weight: 680;\\n  line-height: 1.25;\\n  text-align: center;\\n  overflow-wrap: anywhere;\\n  cursor: pointer;\\n  transition:\\n    color 140ms var(--t-ease-out),\\n    background 140ms var(--t-ease-out),\\n    transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .alert-dialog-demo-trigger:hover {\\n  color: var(--t-ink);\\n  background: var(--t-surface);\\n}\\n\\n.tidal-scope .alert-dialog-demo-trigger:active {\\n  transform: scale(0.975);\\n}\\n\\n.tidal-scope .alert-dialog-demo-trigger:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .alert-dialog-demo-status {\\n  margin: 0;\\n  color: var(--t-muted);\\n  font-size: 12px;\\n  line-height: 1.5;\\n  text-align: center;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .alert-dialog-demo-detail {\\n  display: grid;\\n  grid-template-columns: repeat(2, minmax(0, 1fr));\\n  gap: 12px;\\n  margin: 0;\\n}\\n\\n.tidal-scope .alert-dialog-demo-detail > div {\\n  min-width: 0;\\n}\\n\\n.tidal-scope .alert-dialog-demo-detail dt {\\n  font-size: 10px;\\n  font-weight: 720;\\n  letter-spacing: 0.08em;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .alert-dialog-demo-detail dd {\\n  margin: 3px 0 0;\\n  color: var(--t-ink);\\n  font-size: 12px;\\n  font-weight: 620;\\n  overflow-wrap: anywhere;\\n}\\n\\n@container preview-stage (max-width: 440px) {\\n  .tidal-scope .alert-dialog-demo-card {\\n    display: grid;\\n    gap: 16px;\\n    padding: 16px;\\n  }\\n\\n  .tidal-scope .alert-dialog-demo-trigger {\\n    width: 100%;\\n    font-size: 16px;\\n  }\\n\\n  .tidal-scope .alert-dialog-demo-status {\\n    font-size: 14px;\\n  }\\n}\\n\\n@media (max-width: 440px) {\\n  .tidal-scope .alert-dialog-demo-card {\\n    display: grid;\\n    gap: 16px;\\n    padding: 16px;\\n  }\\n\\n  .tidal-scope .alert-dialog-demo-trigger {\\n    width: 100%;\\n    font-size: 16px;\\n  }\\n\\n  .tidal-scope .alert-dialog-demo-status {\\n    font-size: 14px;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .alert-dialog-demo-trigger {\\n    transition-duration: 0.01ms;\\n  }\\n\\n  .tidal-scope .alert-dialog-demo-trigger:active {\\n    transform: none;\\n  }\\n}\";\n\nexport function AlertDialogDemo({\n  theme = \"light\",\n}: {\n  theme?: \"light\" | \"dark\";\n}) {\n  const [open, setOpen] = useState(false);\n  const [removed, setRemoved] = useState(false);\n  const [status, setStatus] = useState(\"The sample report is available.\");\n  const triggerRef = useRef<HTMLButtonElement>(null);\n\n  return (\n    <section\n      className=\"alert-dialog-demo\"\n      aria-label=\"Report confirmation preview\"\n    >\n      <div\n        className=\"alert-dialog-demo-card\"\n        data-removed={removed || undefined}\n      >\n        <div>\n          <span>Weekly report</span>\n          <strong>\n            {removed ? \"Sample report removed\" : \"October 14 report\"}\n          </strong>\n          <small>\n            {removed ? \"Ready to restore\" : \"12 sections · Edited today\"}\n          </small>\n        </div>\n\n        <TidalAlertDialog\n          theme={theme}\n          open={open}\n          onOpenChange={setOpen}\n          trigger={\n            <button\n              ref={triggerRef}\n              type=\"button\"\n              className=\"alert-dialog-demo-trigger\"\n              onClick={(event) => {\n                if (!removed) return;\n                event.preventDefault();\n                setRemoved(false);\n                setStatus(\"The sample report was restored locally.\");\n              }}\n            >\n              {removed ? \"Restore sample report\" : \"Delete sample report\"}\n            </button>\n          }\n          title=\"Delete this report?\"\n          description=\"This removes the report from the local preview. The action cannot be undone inside the open dialog.\"\n          detail={\n            <dl className=\"alert-dialog-demo-detail\">\n              <div>\n                <dt>Report</dt>\n                <dd>October 14 report</dd>\n              </div>\n              <div>\n                <dt>Contents</dt>\n                <dd>12 sample sections</dd>\n              </div>\n            </dl>\n          }\n          cancelLabel=\"Keep report\"\n          confirmLabel=\"Delete report\"\n          tone=\"danger\"\n          escapeCancels\n          outsidePointerCancels={false}\n          onCancel={(_event, reason) => {\n            setOpen(false);\n            setStatus(\n              reason === \"escape-key\"\n                ? \"Deletion cancelled with Escape.\"\n                : reason === \"outside-pointer\"\n                  ? \"Deletion cancelled from outside the dialog.\"\n                  : \"The sample report was kept.\",\n            );\n          }}\n          onConfirm={() => {\n            setRemoved(true);\n            setOpen(false);\n            setStatus(\"The sample report was removed locally.\");\n          }}\n        />\n      </div>\n\n      <p className=\"alert-dialog-demo-status\" role=\"status\" aria-live=\"polite\">\n        {status} Changes stay in this preview.\n      </p>\n    </section>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <AlertDialogDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/alert-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
    }
  ],
  "events": [
    {
      "name": "onCancel",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "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": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onConfirm",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onOpenChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": false,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "No form submit is present in the existing demo.",
    "resetBehavior": "No reset control is present in the existing demo.",
    "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": "No error fixture is exposed by the existing demo; inject a consumer-owned failure state before production use.",
      "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": []
}
