{
  "antiPatterns": [
    "Closing the parent dialog when a nested layer handles Escape.",
    "Putting all dismissal controls behind a permanently busy state."
  ],
  "api": {
    "importPath": "@ancrel/ui",
    "props": [
      {
        "name": "busy",
        "required": false,
        "type": "boolean"
      },
      {
        "name": "children",
        "required": false,
        "type": "ReactNode"
      },
      {
        "name": "className",
        "required": false,
        "type": "string"
      },
      {
        "name": "description",
        "required": false,
        "type": "ReactNode"
      },
      {
        "name": "footer",
        "required": false,
        "type": "ReactNode"
      },
      {
        "name": "key",
        "required": false,
        "type": "React.Key | null | undefined"
      },
      {
        "name": "onOpenChange",
        "required": true,
        "type": "(open: boolean) => void"
      },
      {
        "name": "open",
        "required": true,
        "type": "boolean"
      },
      {
        "name": "ref",
        "required": false,
        "type": "React.Ref<HTMLDivElement> | undefined"
      },
      {
        "name": "title",
        "required": true,
        "type": "ReactNode"
      }
    ],
    "symbol": "Dialog",
    "typeRef": "api/ui/dialog/index.d.ts"
  },
  "constraints": [
    "Provide a meaningful title and update open in onOpenChange.",
    "Bind busy to the operation that must finish before dismissal."
  ],
  "docs": "raw/frontend/dialog.md",
  "examples": [
    {
      "code": "'use client'\n\nimport { useState } from 'react'\nimport { Button, Dialog } from '@ancrel/ui'\nimport '@ancrel/tokens/css'\nimport '@ancrel/ui/styles.css'\n\nexport default function App() {\n  const [open, setOpen] = useState(false)\n  const [busy, setBusy] = useState(false)\n  return <>\n    <Button onClick={() => setOpen(true)}>Review changes</Button>\n    <Dialog open={open} onOpenChange={setOpen} busy={busy} title=\"Publish changes\"\n      description=\"Review the summary before publishing.\"\n      footer={<Button onClick={() => setBusy(!busy)}>{busy ? 'Finish' : 'Start review'}</Button>}>\n      <p>Two pages have changed.</p>\n    </Dialog>\n  </>\n}\n",
      "command": "pnpm test",
      "entry": "examples/fe.dialog/App.tsx",
      "fixture": "examples/fe.dialog/",
      "id": "minimal"
    }
  ],
  "id": "fe.dialog",
  "kind": "react-component",
  "language": "typescript",
  "layer": "frontend",
  "owner": "frontend-infra",
  "package": {
    "ecosystem": "npm",
    "name": "@ancrel/ui",
    "version": "0.2.0"
  },
  "provenance": {
    "changes": "Adapted the modal frame and guarded dismissal in lines 24–100. Shared portal and focus primitives handle nesting, accessible naming and restoration. Title, description, children and footer replace application-specific content.",
    "commit": "4cc384c3bdbd09a3a50268adf81ba23f53aac93e",
    "mode": "extracted",
    "origin": "rule-studio",
    "path": "frontend/src/components/common/RewindConfirmModal.tsx",
    "rights": "org-internal; approved-by=owner; ref=item-19"
  },
  "schemaVersion": 1,
  "stability": "experimental",
  "summary": "A controlled modal dialog with named content, keyboard containment, focus restoration, and a busy dismissal guard.",
  "tokenDependencies": [
    "ref.color.x0c0c10",
    "ref.color.x16161a",
    "ref.color.x202025",
    "ref.color.x373740",
    "ref.color.xd2d2da",
    "ref.color.xededef",
    "ref.color.xf5f5f7",
    "ref.color.xffffff",
    "ref.level.n30",
    "ref.shadow.dark.overlay",
    "ref.shadow.light.overlay",
    "ref.space.px12",
    "ref.space.px2",
    "ref.space.px24",
    "ref.space.px32",
    "ref.space.px6",
    "ref.space.px8",
    "sys.border.default",
    "sys.elevation.overlay",
    "sys.ink.primary",
    "sys.layer.modal",
    "sys.radius.md",
    "sys.space.hair",
    "sys.space.inset",
    "sys.space.section",
    "sys.surface.canvas",
    "sys.surface.panel"
  ]
}
