{
  "$schema": "https://registry.ui.frontic.com/item.schema.json",
  "title": "Dialog",
  "description": "A modal window over the page, with a header, a body that scrolls when it outgrows the screen, and a footer for actions such as save and cancel.",
  "components": {
    "Dialog": "Groups all parts of the dialog.",
    "DialogBody": "Holds the dialog's main content and scrolls it when the dialog outgrows the screen, keeping the header and footer in view.",
    "DialogClose": "Closes the dialog.",
    "DialogContent": "Holds what the dialog shows while open.",
    "DialogDescription": "Explains the purpose of the dialog below its title.",
    "DialogFooter": "Holds the actions of the dialog, such as confirm and cancel buttons.",
    "DialogHeader": "Groups the title and description at the top of the dialog.",
    "DialogOverlay": "Covers the page behind the open dialog.",
    "DialogScrollContent": "Holds what the dialog shows while open, scrolling when the content is tall.",
    "DialogTitle": "Names the dialog.",
    "DialogTrigger": "Opens the dialog."
  },
  "recipes": {
    "dialog-body": {
      "base": {
        "minHeight": "{spacing.0}",
        "bleedX": "{spacing.6}",
        "paddingX": "{spacing.6}",
        "bleedY": "{spacing.2}",
        "paddingY": "{spacing.2}",
        "@md": {
          "bleedX": "{spacing.8}",
          "paddingX": "{spacing.8}"
        }
      }
    },
    "dialog-content": {
      "base": {
        "extends": ["overlay-modal", "surface-inset"],
        "gap": "{spacing.6}",
        "paddingX": "{spacing.6}",
        "width": "full",
        "@md": {
          "paddingX": "{spacing.8}"
        }
      },
      "variants": {
        "layout": {
          "fill": {
            "display": "flex",
            "flexDirection": "column"
          },
          "scroll": {
            "display": "grid",
            "maxWidth": "{container.lg}"
          }
        }
      },
      "defaults": {
        "layout": "fill"
      }
    },
    "dialog-description": {
      "base": {
        "marginTop": "{spacing.0.5}",
        "extends": ["part-description", "link-foreground"]
      }
    },
    "dialog-footer": {
      "base": {
        "display": "flex",
        "flexDirection": "column-reverse",
        "gap": "{spacing.2}",
        "@sm": {
          "flexDirection": "row",
          "justifyContent": "end"
        }
      }
    },
    "dialog-header": {
      "base": {
        "display": "flex",
        "flexDirection": "column",
        "gap": "{spacing.2}"
      }
    },
    "dialog-overlay": {
      "base": {
        "extends": "overlay-backdrop"
      }
    },
    "dialog-title": {
      "base": {
        "extends": "part-title",
        "lineHeight": "none"
      }
    }
  }
}
