{
 "id": "empty-state",
 "name": "Empty state",
 "purpose": "What a list shows when there is nothing in it: a small drawing in the system's own colours, what it means, when that changes, and one thing to do.",
 "use_when": [
  "when a list or page has nothing in it yet",
  "a list someone has cleared, where the message should say all is done and when new items will arrive"
 ],
 "avoid_when": [
  "something went wrong loading the list: use alert-banners with a retry action",
  "a first-run checklist of several steps to get going: use setup-steps",
  "a short notice above a list that still has items: use alert-banners"
 ],
 "type": "feedback",
 "style": "friendly",
 "width": "narrow",
 "tags": {
  "audience": "work",
  "industries": [
   "any"
  ],
  "keywords": [
   "empty state",
   "zero data",
   "illustration",
   "onboarding",
   "call to action"
  ]
 },
 "root": ".odl-empty-state",
 "parts": [
  {
   "name": "art",
   "selector": ".odl-art",
   "what": "a small icon drawing in a sunken tile, with a status badge in its corner",
   "slot": "none"
  },
  {
   "name": "title",
   "selector": "h3",
   "what": "what the empty list means",
   "slot": "text"
  },
  {
   "name": "body",
   "selector": "p",
   "what": "one sentence on when that changes",
   "slot": "text"
  },
  {
   "name": "primary",
   "selector": ".odl-acts button",
   "what": "the one main action",
   "slot": "action"
  },
  {
   "name": "secondary",
   "selector": ".odl-acts a",
   "what": "an optional quieter link",
   "slot": "action"
  }
 ],
 "data": {
  "type": "object",
  "required": [
   "title"
  ],
  "properties": {
   "label": {
    "type": "string",
    "maxLength": 32
   },
   "title": {
    "type": "string",
    "maxLength": 48,
    "part": "title"
   },
   "body": {
    "type": "string",
    "maxLength": 120,
    "part": "body"
   },
   "primary": {
    "type": "string",
    "maxLength": 24,
    "part": "primary"
   },
   "secondary": {
    "type": "object",
    "required": [
     "label",
     "href"
    ],
    "part": "secondary",
    "properties": {
     "label": {
      "type": "string",
      "maxLength": 24
     },
     "href": {
      "type": "string",
      "maxLength": 300
     }
    }
   }
  }
 },
 "states": {
  "shown": [
   "empty, all done",
   "hover",
   "focus"
  ],
  "edge": {
   "empty": {
    "status": "shown",
    "how": "this component is the empty state of a list or page",
    "evidence": "<section class=\"odl-empty-state\""
   },
   "loading": {
    "status": "handled",
    "evidence": "data-od-slot",
    "how": "the Smart UI renderer draws each marked slot as a quiet block of its size while the data arrives; the static file shows the filled part"
   },
   "error": {
    "status": "not_built",
    "how": "for a failed load, use alert-banners instead, or swap the badge for a warning icon and make the button Try again"
   },
   "disabled": {
    "status": "not_built",
    "how": "while the action runs, set disabled on the button and add a :disabled style in the disabled colours"
   },
   "overflow": {
    "status": "handled",
    "how": "the actions wrap, and in a narrow box they stack and take the full width",
    "evidence": ".odl-empty-state .odl-acts { flex-direction: column; align-self: stretch; }"
   },
   "long_text": {
    "status": "handled",
    "how": "the heading balances its lines and the sentence wraps at 38 characters",
    "evidence": "max-inline-size: 38ch"
   },
   "missing_image": {
    "status": "none",
    "how": "the part has no photo"
   }
  }
 },
 "tokens": [
  "--ds-border-width-default",
  "--ds-color-bg-action-primary",
  "--ds-color-bg-action-primary-hover",
  "--ds-color-bg-neutral-subtle",
  "--ds-color-border-default",
  "--ds-color-border-focus",
  "--ds-color-border-subtle",
  "--ds-color-icon-default",
  "--ds-color-surface-raised",
  "--ds-color-surface-sunken",
  "--ds-color-text-on-action",
  "--ds-color-text-primary",
  "--ds-color-text-secondary",
  "--ds-color-text-success",
  "--ds-focus-ring-offset",
  "--ds-focus-ring-width",
  "--ds-font-weight-label",
  "--ds-icon-stroke-md",
  "--ds-icon-stroke-sm",
  "--ds-motion-duration-short",
  "--ds-motion-easing-standard",
  "--ds-radius-container",
  "--ds-radius-control",
  "--ds-radius-full",
  "--ds-size-control-lg",
  "--ds-size-control-md",
  "--ds-size-icon-lg",
  "--ds-size-icon-md",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-2",
  "--ds-space-6",
  "--ds-space-inline-sm",
  "--ds-space-inset-lg",
  "--ds-space-inset-md",
  "--ds-space-inset-xl",
  "--ds-space-section-sm",
  "--ds-space-stack-lg",
  "--ds-space-stack-sm",
  "--ds-space-stack-xl",
  "--ds-text-body-md",
  "--ds-text-label-lg",
  "--ds-text-title-md"
 ],
 "a11y": {
  "summary": "The drawing is decorative and hidden from screen readers; the heading says what the state means, and the one primary action is a real button.",
  "roles": [
   "region"
  ],
  "keyboard": [
   "Tab reaches the main button, then the link",
   "Enter or Space presses the button; Enter follows the link"
  ],
  "controls": {
   "button": 1,
   "input": 0,
   "link": 1,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/empty-state/component.html",
  "bytes": 5983,
  "script": false
 },
 "source": null,
 "photos": 0,
 "urls": {
  "html": "https://opendesigner.dev/library/empty-state.html",
  "json": "https://opendesigner.dev/library/empty-state.json",
  "page": "https://opendesigner.dev/library/empty-state/"
 },
 "get": {
  "curl": "curl -fsSLo empty-state.html https://opendesigner.dev/library/empty-state.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add empty-state --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component empty-state to this project: https://opendesigner.dev/library/empty-state.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
