{
  "format": "ui-contract-component-draft",
  "id": "shadcn:Dialog",
  "version": "0.4.1",
  "status": "complete",
  "domains": {
    "interface": "interface.json",
    "visual": {
      "tokens": "../../tokens.json",
      "css": "layout.css"
    },
    "behavior": "behavior.scxml",
    "accessibility": {
      "html": "accessibility.html",
      "rules": "accessibility.rules.json"
    }
  },
  "anatomy": {
    "root": "Owns open/modal state without a DOM root.",
    "trigger": "Actual primitive native trigger.",
    "content": "Actual focus-managed popup surface.",
    "overlay": "Actual modal backdrop; Sheet owns its unexported internal wrapper through Content.",
    "header": "Intrinsic heading stack.",
    "footer": "Actions, kept in caller order.",
    "title": "Actual heading named by primitive relation.",
    "description": "Actual descriptive paragraph.",
    "portal": "Portal ownership, not a styled anatomy element.",
    "close": "Native close action, including optional internal icon close."
  },
  "stories": "stories.json",
  "ux": "ux.json",
  "composition": {
    "button": {
      "component": "../button/component.json"
    }
  },
  "convention": "semantic-component/1",
  "partBindings": {
    "root": {
      "kind": "controller",
      "declaration": "Dialog",
      "description": "Owns open/modal state without a DOM root.",
      "ownership": "React context/portal control, no promised DOM element"
    },
    "trigger": {
      "kind": "element",
      "declaration": "DialogTrigger",
      "selector": "[data-slot=\"dialog-trigger\"]",
      "description": "Actual primitive native trigger.",
      "ownership": "actual pinned wrapper"
    },
    "content": {
      "kind": "element",
      "declaration": "DialogContent",
      "selector": "[data-slot=\"dialog-content\"]",
      "description": "Actual focus-managed popup surface.",
      "ownership": "actual pinned wrapper"
    },
    "overlay": {
      "kind": "element",
      "declaration": "DialogOverlay",
      "selector": "[data-slot=\"dialog-overlay\"]",
      "description": "Actual modal backdrop; Sheet owns its unexported internal wrapper through Content.",
      "ownership": "actual pinned wrapper"
    },
    "header": {
      "kind": "element",
      "declaration": "DialogHeader",
      "selector": "[data-slot=\"dialog-header\"]",
      "description": "Intrinsic heading stack.",
      "ownership": "actual pinned wrapper"
    },
    "footer": {
      "kind": "element",
      "declaration": "DialogFooter",
      "selector": "[data-slot=\"dialog-footer\"]",
      "description": "Actions, kept in caller order.",
      "ownership": "actual pinned wrapper"
    },
    "title": {
      "kind": "element",
      "declaration": "DialogTitle",
      "selector": "[data-slot=\"dialog-title\"]",
      "description": "Actual heading named by primitive relation.",
      "ownership": "actual pinned wrapper"
    },
    "description": {
      "kind": "element",
      "declaration": "DialogDescription",
      "selector": "[data-slot=\"dialog-description\"]",
      "description": "Actual descriptive paragraph.",
      "ownership": "actual pinned wrapper"
    },
    "portal": {
      "kind": "controller",
      "declaration": "DialogPortal",
      "description": "Portal ownership, not a styled anatomy element.",
      "ownership": "React context/portal control, no promised DOM element"
    },
    "close": {
      "kind": "element",
      "declaration": "DialogClose",
      "selector": "[data-slot=\"dialog-close\"]",
      "description": "Native close action, including optional internal icon close.",
      "ownership": "actual pinned wrapper"
    }
  },
  "visualContract": {
    "tokens": {
      "border-width": "semantic.border.width",
      "color-background": "semantic.color.background",
      "color-border": "semantic.color.border",
      "color-foreground": "semantic.color.foreground",
      "color-muted-foreground": "semantic.color.mutedForeground",
      "dialog-backdrop-opacity": "components.dialog.backdropOpacity",
      "dialog-gap": "components.dialog.gap",
      "dialog-header-gap": "components.dialog.headerGap",
      "dialog-max-width": "components.dialog.maxWidth",
      "dialog-padding": "components.dialog.padding",
      "dialog-radius": "components.dialog.radius",
      "dialog-title-line-height": "components.dialog.titleLineHeight",
      "dialog-title-size": "components.dialog.titleSize",
      "dialog-title-weight": "components.dialog.titleWeight",
      "font-fallback": "semantic.typography.fallbackFamily",
      "font-family": "semantic.typography.fontFamily",
      "font-size-body": "semantic.typography.bodySize",
      "line-height-body": "semantic.typography.bodyLineHeight"
    },
    "runtimeProperties": {},
    "layoutPolicy": "The pinned Dialog wrapper owns the actual parts and primitive lifecycle; Root/Portal are controllers rather than invented DOM identities. Content is centered with a native 14px corner and 16px inset/gap; 448px (Dialog) or 424px (AlertDialog) is a selected maximum, shrinking to viewport minus 32px. AlertDialog sm uses the native 320px compact surface and actual 40px media tile. Native title 16/24 (Medium, or Semi Bold for AlertDialog) and body 14/20 are intrinsic text roles, never fixed frame heights. Footer order remains DOM order and wraps. Button actions explicitly depend on Button tokens/CVA, while primitive triggers remain bare unless the caller composes Button. Backdrop 50% and viewport clearance are explicit reference decisions; static examples do not measure live dimming. Close and Escape follow the actual primitive callback and host authority; no CSS rule invents state transitions.",
    "variants": {
      "placement": "Actual public showCloseButton"
    },
    "sourceTraceability": "figma/traceability.json"
  }
}
