{
 "id": "success-confirmation",
 "name": "Success confirmation",
 "purpose": "The screen after a task is done: what happened in one line, the key details to keep, what happens next, and where to go from here.",
 "use_when": [
  "after a form or flow that someone will want proof of (a payment, an order, a sent invoice, a booking)",
  "a multi-step flow or important form has finished",
  "the person may need a reference or receipt"
 ],
 "avoid_when": [
  "a small, quick change: a toast is enough (toast-undo)",
  "nothing changed yet (the request is pending): say it's pending, not done"
 ],
 "type": "states",
 "style": "quiet",
 "width": "narrow",
 "tags": {
  "audience": "work",
  "industries": [
   "any"
  ],
  "keywords": [
   "success",
   "confirmation",
   "receipt",
   "done",
   "next steps"
  ]
 },
 "root": ".odl-success-confirmation",
 "parts": [
  {
   "name": "title",
   "selector": ".odl-success-confirmation [data-od-slot=\"title\"]",
   "what": "the heading: what happened, in plain words, as in “Invoice sent”",
   "slot": "text"
  },
  {
   "name": "message",
   "selector": ".odl-success-confirmation [data-od-slot=\"message\"]",
   "what": "one or two sentences: what it means and what to do next, as in “Gorsedown Print will get INV-2042 by email in a ”",
   "slot": "text"
  },
  {
   "name": "details",
   "selector": ".odl-success-confirmation [data-od-list=\"details\"]",
   "what": "the details, one item each",
   "slot": "list"
  },
  {
   "name": "details.label",
   "selector": ".odl-success-confirmation [data-od-list=\"details\"] [data-od-slot=\"label\"]",
   "what": "the visible label, as in “Amount”",
   "slot": "text"
  },
  {
   "name": "details.value",
   "selector": ".odl-success-confirmation [data-od-list=\"details\"] [data-od-slot=\"value\"]",
   "what": "what the person typed, as in “$4,280.00”",
   "slot": "text"
  },
  {
   "name": "next",
   "selector": ".odl-success-confirmation [data-od-slot=\"next\"]",
   "what": "what happens next, as in “We'll email you when they open it and when they ”",
   "slot": "text"
  },
  {
   "name": "view",
   "selector": ".odl-success-confirmation [data-od-action=\"view\"]",
   "what": "the View invoice action",
   "slot": "action"
  },
  {
   "name": "another",
   "selector": ".odl-success-confirmation [data-od-action=\"another\"]",
   "what": "the Send another action",
   "slot": "action"
  }
 ],
 "data": {
  "type": "object",
  "properties": {
   "title": {
    "type": "string",
    "maxLength": 24,
    "part": "title"
   },
   "message": {
    "type": "string",
    "maxLength": 80,
    "part": "message"
   },
   "details": {
    "type": "array",
    "minItems": 1,
    "maxItems": 6,
    "items": {
     "type": "object",
     "properties": {
      "label": {
       "type": "string",
       "maxLength": 24,
       "part": "details.label"
      },
      "value": {
       "type": "string",
       "maxLength": 24,
       "part": "details.value"
      }
     },
     "required": [
      "label",
      "value"
     ]
    },
    "part": "details"
   },
   "next": {
    "type": "string",
    "maxLength": 80,
    "part": "next"
   }
  },
  "required": [
   "title",
   "message",
   "details",
   "next"
  ]
 },
 "states": {
  "shown": [
   "done",
   "hover",
   "focus"
  ],
  "edge": {
   "empty": {
    "status": "handled",
    "evidence": "data-od-list",
    "how": "the Smart UI renderer puts one plain 'Nothing to show yet.' line in an empty list"
   },
   "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": "If the task failed, don't show this; return to the form with page-banners and the person's values kept."
   },
   "disabled": {
    "status": "not_built",
    "how": "No control here is ever disabled; each one always does something."
   },
   "overflow": {
    "status": "handled",
    "how": "Long values such as email addresses break anywhere instead of overflowing.",
    "evidence": "overflow-wrap: anywhere"
   },
   "long_text": {
    "status": "handled",
    "how": "Titles balance and body text wraps at word boundaries inside a capped measure.",
    "evidence": "text-wrap"
   },
   "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-action-primary-pressed",
  "--ds-color-bg-neutral-subtle",
  "--ds-color-bg-success-subtle",
  "--ds-color-border-default",
  "--ds-color-border-focus",
  "--ds-color-border-subtle",
  "--ds-color-surface-raised",
  "--ds-color-surface-sunken",
  "--ds-color-text-link",
  "--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-heading",
  "--ds-font-weight-label",
  "--ds-icon-stroke-lg",
  "--ds-icon-stroke-md",
  "--ds-motion-duration-short",
  "--ds-motion-easing-standard",
  "--ds-opacity-disabled-container",
  "--ds-radius-container",
  "--ds-radius-control",
  "--ds-radius-full",
  "--ds-radius-nested",
  "--ds-size-control-lg",
  "--ds-size-control-md",
  "--ds-size-icon-md",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-inline-md",
  "--ds-space-inline-sm",
  "--ds-space-inset-lg",
  "--ds-space-inset-md",
  "--ds-space-inset-sm",
  "--ds-space-inset-xl",
  "--ds-space-stack-lg",
  "--ds-space-stack-md",
  "--ds-space-stack-xl",
  "--ds-space-stack-xs",
  "--ds-text-body-md",
  "--ds-text-body-sm",
  "--ds-text-label-lg",
  "--ds-text-title-lg"
 ],
 "a11y": {
  "summary": "When this screen replaces the form, move focus to its heading (it has tabindex -1 for that), so it is read first; the part never moves focus on its own. Details are a description list.",
  "roles": [
   "region"
  ],
  "keyboard": [
   "Focus moves to the heading when the screen appears",
   "Tab then reaches View invoice and Send another"
  ],
  "controls": {
   "button": 0,
   "input": 0,
   "link": 2,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/success-confirmation/component.html",
  "bytes": 6605,
  "script": false
 },
 "source": null,
 "photos": 0,
 "urls": {
  "html": "https://opendesigner.dev/library/success-confirmation.html",
  "json": "https://opendesigner.dev/library/success-confirmation.json",
  "page": "https://opendesigner.dev/library/success-confirmation/"
 },
 "get": {
  "curl": "curl -fsSLo success-confirmation.html https://opendesigner.dev/library/success-confirmation.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add success-confirmation --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component success-confirmation to this project: https://opendesigner.dev/library/success-confirmation.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
