{
  "$schema": "https://next.0build.dev/schema/component.v1.json",
  "accessibility": {
    "aria": [],
    "notes": [
      "While a timed dismissal runs the alert is set `inert`, removing it from the tab order and accessibility tree before it is removed from the DOM."
    ]
  },
  "attributes": [],
  "category": "feedback",
  "children": [],
  "cssClasses": [
    {
      "appliesTo": ".z-alert",
      "class": ".z-alert",
      "description": "Root class of the alert box: a padded, bordered, rounded container with a tinted background.",
      "role": "root"
    },
    {
      "appliesTo": ".z-alert",
      "class": ".z-alert-close",
      "description": "Close affordance positioned in the top inline-end corner; put `data-close` on the button or link that uses it.",
      "role": "element"
    },
    {
      "appliesTo": ".z-alert",
      "class": ".z-alert-danger",
      "description": "Danger variant: re-tints background, border, and text with the danger color.",
      "role": "modifier"
    },
    {
      "appliesTo": ".z-alert",
      "class": ".z-alert-info",
      "description": "Info variant: re-tints background, border, and text with the info color.",
      "role": "modifier"
    },
    {
      "appliesTo": ".z-alert",
      "class": ".z-alert-success",
      "description": "Success variant: re-tints background, border, and text with the success color.",
      "role": "modifier"
    },
    {
      "appliesTo": ".z-alert",
      "class": ".z-alert-warning",
      "description": "Warning variant: re-tints background, border, and text with the warning color.",
      "role": "modifier"
    }
  ],
  "cssVars": [
    {
      "affects": [
        "background-color"
      ],
      "default": "var(--z-muted)",
      "description": "Background base color, mixed with transparency using `--z-alert-bg-o`.",
      "file": "src/css/kit-components/alert.css",
      "kind": "base",
      "name": "--z-alert-bg",
      "scope": ".z-alert",
      "syntax": "<color>"
    },
    {
      "affects": [
        "background-color"
      ],
      "default": "4%",
      "description": "Background opacity percentage used in the background color mix.",
      "file": "src/css/kit-components/alert.css",
      "kind": "base",
      "name": "--z-alert-bg-o",
      "scope": ".z-alert",
      "syntax": "<percentage>"
    },
    {
      "affects": [
        "border-color"
      ],
      "default": "var(--z-border)",
      "description": "Border base color, mixed with transparency using `--z-alert-border-o`.",
      "file": "src/css/kit-components/alert.css",
      "kind": "base",
      "name": "--z-alert-border",
      "scope": ".z-alert",
      "syntax": "<color>"
    },
    {
      "affects": [
        "border-color"
      ],
      "default": "var(--z-border-o)",
      "description": "Border opacity percentage used in the border color mix.",
      "file": "src/css/kit-components/alert.css",
      "kind": "base",
      "name": "--z-alert-border-o",
      "scope": ".z-alert",
      "syntax": "<percentage>"
    },
    {
      "affects": [
        "color"
      ],
      "default": "var(--z-muted-f)",
      "description": "Text base color, mixed with transparency using `--z-alert-color-o`.",
      "file": "src/css/kit-components/alert.css",
      "kind": "base",
      "name": "--z-alert-color",
      "scope": ".z-alert",
      "syntax": "<color>"
    },
    {
      "affects": [
        "color"
      ],
      "default": "100%",
      "description": "Text opacity percentage used in the text color mix.",
      "file": "src/css/kit-components/alert.css",
      "kind": "base",
      "name": "--z-alert-color-o",
      "scope": ".z-alert",
      "syntax": "<percentage>"
    },
    {
      "affects": [
        "border-radius"
      ],
      "default": "var(--z-global-radius)",
      "description": "Corner radius of the alert box.",
      "file": "src/css/kit-components/alert.css",
      "kind": "base",
      "name": "--z-alert-radius",
      "scope": ".z-alert",
      "syntax": "<length>"
    }
  ],
  "dataHooks": [
    {
      "appliesTo": "external-trigger",
      "attribute": "data-close",
      "description": "Dismisses through the shared close system. An empty value closes the nearest `.z-alert` or `[data-dismissible]` ancestor of the trigger; a selector or `#id` value closes that target. Object syntax accepts `target`, `animation` (`false` to remove instantly), and `duration` in milliseconds (default 150).",
      "role": "trigger",
      "values": []
    },
    {
      "appliesTo": "host",
      "attribute": "data-dismissible",
      "description": "Marks an element as dismissible without the `.z-alert` class; the close system's ancestor search matches `.z-alert, [data-dismissible]`.",
      "role": "marker",
      "values": []
    }
  ],
  "events": [
    {
      "bubbles": true,
      "cancelable": true,
      "description": "Fires on the alert before it is dismissed. Cancelable: `preventDefault()` keeps the alert in the page. Detail carries `target` (the alert) and `trigger` (the clicked close element, or `null`).",
      "detail": {
        "fields": [
          {
            "name": "target",
            "type": "HTMLElement"
          },
          {
            "name": "trigger",
            "type": "HTMLElement | null"
          }
        ],
        "type": "{ target: HTMLElement; trigger: HTMLElement | null }"
      },
      "name": "z-alert:before-hide"
    },
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires on the alert after dismissal is confirmed, before it is removed. Detail carries `target` and `trigger`.",
      "detail": {
        "fields": [
          {
            "name": "target",
            "type": "HTMLElement"
          },
          {
            "name": "trigger",
            "type": "HTMLElement | null"
          }
        ],
        "type": "{ target: HTMLElement; trigger: HTMLElement | null }"
      },
      "name": "z-alert:hide"
    }
  ],
  "i18n": [],
  "icons": [],
  "id": "alert",
  "inherits": [],
  "keyboard": [],
  "kind": "css",
  "methods": [],
  "notes": [
    "Alerts have no component class: dismissal is driven by the shared close singleton (`singletons/close.ts`) through the document-level toggle delegate installed by the essentials bundle.",
    "Dismissal plays the `z-closing` transition (default 150 ms) and removes the alert when it ends; `animation: false` or `duration: 0` in the `data-close` value removes it instantly.",
    "Unclassed links inside an alert are underlined and medium-weight so they stand out against the tinted background."
  ],
  "parts": {
    "defaultClsTarget": null,
    "defaultStlTarget": null,
    "items": []
  },
  "recipes": [],
  "related": [
    "toast"
  ],
  "schemaVersion": 1,
  "sources": {
    "css": [
      "src/css/kit-components/alert.css"
    ],
    "cssSelectors": [
      ".z-alert",
      ".z-alert-*"
    ],
    "singleton": {
      "file": "src/js/singletons/close.ts",
      "scope": ".z-alert"
    },
    "ts": null
  },
  "summary": "Dismissible inline message with status variants, styled by CSS and dismissed by the shared close system.",
  "tag": null,
  "title": "Alert"
}
