{
 "id": "notification-inbox",
 "name": "Notification inbox",
 "purpose": "A notifications panel with All and Mentions tabs, unread dots, Today and Earlier groups, and one inline action such as Approve or View.",
 "use_when": [
  "for a work app's notifications and mentions",
  "a bell-icon popover or side panel where some notifications can be acted on in place, such as approving a request"
 ],
 "avoid_when": [
  "a short message about something that just happened: use toast-stack",
  "a running history of changes to one record: use activity-feed or audit-log",
  "a warning that applies to the whole page: use alert-banners"
 ],
 "type": "data",
 "style": "quiet",
 "width": "narrow",
 "tags": {
  "audience": "work",
  "industries": [
   "saas",
   "finance",
   "productivity"
  ],
  "keywords": [
   "notifications",
   "inbox",
   "mentions",
   "unread",
   "activity"
  ]
 },
 "root": ".odl-notification-inbox",
 "parts": [
  {
   "name": "title",
   "selector": "h3",
   "what": "the panel heading",
   "slot": "text"
  },
  {
   "name": "mark_all",
   "selector": ".odl-markall",
   "what": "clears every unread dot",
   "slot": "action"
  },
  {
   "name": "tabs",
   "selector": "[role=\"tab\"]",
   "what": "one filter tab, with an optional unread count",
   "slot": "list"
  },
  {
   "name": "groups",
   "selector": ".odl-group",
   "what": "a time group heading such as Today or Earlier",
   "slot": "list"
  },
  {
   "name": "rows",
   "selector": ".odl-row",
   "what": "one notification: unread dot, avatar, line, optional quote, time and source, optional actions",
   "slot": "list"
  },
  {
   "name": "avatar",
   "selector": ".odl-avatar",
   "what": "the sender's photo, or an icon for system notices",
   "slot": "media"
  },
  {
   "name": "line",
   "selector": ".odl-line",
   "what": "what happened, with names and items in bold",
   "slot": "rich"
  },
  {
   "name": "quote",
   "selector": ".odl-quote",
   "what": "the quoted text of a mention",
   "slot": "text"
  },
  {
   "name": "meta",
   "selector": ".odl-meta",
   "what": "time and where it came from, separated by dots",
   "slot": "text"
  },
  {
   "name": "actions",
   "selector": ".odl-actions button",
   "what": "one or two inline buttons such as Approve or View",
   "slot": "action"
  },
  {
   "name": "done",
   "selector": ".odl-done",
   "what": "the result line that replaces the actions after approving",
   "slot": "text"
  },
  {
   "name": "footer",
   "selector": ".odl-foot button",
   "what": "a link-style button to notification settings",
   "slot": "action"
  }
 ],
 "data": {
  "type": "object",
  "required": [
   "groups"
  ],
  "properties": {
   "title": {
    "type": "string",
    "maxLength": 24,
    "part": "title"
   },
   "tabs": {
    "type": "array",
    "minItems": 2,
    "maxItems": 3,
    "part": "tabs",
    "items": {
     "type": "object",
     "required": [
      "label",
      "filter"
     ],
     "properties": {
      "label": {
       "type": "string",
       "maxLength": 12
      },
      "filter": {
       "type": "string",
       "maxLength": 16
      },
      "count": {
       "type": "integer",
       "minimum": 0,
       "maximum": 99
      }
     }
    }
   },
   "groups": {
    "type": "array",
    "minItems": 1,
    "maxItems": 3,
    "part": "groups",
    "items": {
     "type": "object",
     "required": [
      "label",
      "items"
     ],
     "properties": {
      "label": {
       "type": "string",
       "maxLength": 16
      },
      "items": {
       "type": "array",
       "minItems": 1,
       "maxItems": 6,
       "items": {
        "type": "object",
        "required": [
         "line",
         "time"
        ],
        "properties": {
         "kind": {
          "type": "string",
          "maxLength": 16
         },
         "unread": {
          "type": "boolean"
         },
         "avatar": {
          "type": "string",
          "maxLength": 300
         },
         "line": {
          "type": "string",
          "maxLength": 110
         },
         "quote": {
          "type": "string",
          "maxLength": 120
         },
         "time": {
          "type": "string",
          "maxLength": 20
         },
         "source": {
          "type": "string",
          "maxLength": 40
         },
         "actions": {
          "type": "array",
          "minItems": 0,
          "maxItems": 2,
          "items": {
           "type": "string",
           "maxLength": 14
          }
         },
         "done": {
          "type": "string",
          "maxLength": 40
         }
        }
       }
      }
     }
    }
   },
   "footer": {
    "type": "string",
    "maxLength": 28,
    "part": "footer"
   }
  }
 },
 "states": {
  "shown": [
   "unread",
   "read",
   "hover",
   "focus",
   "tab selected",
   "approved",
   "filtered"
  ],
  "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 notifications fail to load, show an alert-banners line inside the panel with a retry button; if approving fails, put the actions back and show a toast-stack message"
   },
   "disabled": {
    "status": "not_built",
    "how": "while an approval is sending, set disabled on that row's buttons"
   },
   "overflow": {
    "status": "not_built",
    "how": "the panel grows with its content; give the tab panel a max height and overflow-y: auto so the header and footer stay put"
   },
   "long_text": {
    "status": "handled",
    "how": "the text column can shrink, so long lines and quotes wrap under each other beside the avatar",
    "evidence": "grid-template-columns: var(--ds-space-8) var(--ds-size-control-sm) minmax(0, 1fr)"
   },
   "missing_image": {
    "status": "handled",
    "evidence": "data-od-media",
    "how": "the Smart UI renderer swaps a photo that fails to load for a block of the same size with its alt text"
   }
  }
 },
 "tokens": [
  "--ds-border-width-default",
  "--ds-border-width-emphasis",
  "--ds-border-width-selected",
  "--ds-color-bg-accent-bold",
  "--ds-color-bg-action-primary",
  "--ds-color-bg-action-primary-hover",
  "--ds-color-bg-neutral-subtle",
  "--ds-color-bg-neutral-subtle-hover",
  "--ds-color-border-accent",
  "--ds-color-border-default",
  "--ds-color-border-focus",
  "--ds-color-border-subtle",
  "--ds-color-icon-subtle",
  "--ds-color-surface-overlay",
  "--ds-color-surface-raised",
  "--ds-color-text-link",
  "--ds-color-text-on-accent",
  "--ds-color-text-on-action",
  "--ds-color-text-primary",
  "--ds-color-text-secondary",
  "--ds-color-text-success",
  "--ds-color-text-tertiary",
  "--ds-elevation-overlay",
  "--ds-focus-ring-width",
  "--ds-font-weight-label",
  "--ds-icon-stroke-md",
  "--ds-motion-duration-short",
  "--ds-motion-easing-standard",
  "--ds-radius-control",
  "--ds-radius-full",
  "--ds-radius-nested",
  "--ds-radius-overlay",
  "--ds-radius-person",
  "--ds-size-control-sm",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-2",
  "--ds-space-20",
  "--ds-space-8",
  "--ds-space-inline-md",
  "--ds-space-inline-sm",
  "--ds-space-inline-xs",
  "--ds-space-inset-lg",
  "--ds-space-inset-md",
  "--ds-space-inset-sm",
  "--ds-space-inset-xl",
  "--ds-space-inset-xs",
  "--ds-space-stack-sm",
  "--ds-space-stack-xs",
  "--ds-text-body-md",
  "--ds-text-body-sm",
  "--ds-text-label-lg",
  "--ds-text-label-md",
  "--ds-text-label-md-tracking",
  "--ds-text-label-sm",
  "--ds-text-title-md"
 ],
 "a11y": {
  "summary": "Tabs follow the tab pattern with arrow keys; groups are labelled lists; Approve and View are real buttons and the result is shown as text. Placement as a popover is the project's.",
  "roles": [
   "list",
   "region",
   "tab",
   "tablist",
   "tabpanel"
  ],
  "keyboard": [
   "Tab reaches Mark all read, the selected tab, each notification row, its buttons, and Notification settings",
   "Left and Right arrows move between the All and Mentions tabs and filter the list; only the selected tab is in the Tab order",
   "Enter or Space on Approve marks it approved and shows the result line; Enter on a row itself does nothing"
  ],
  "controls": {
   "button": 10,
   "input": 0,
   "link": 0,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/notification-inbox/component.html",
  "bytes": 16960,
  "script": true
 },
 "source": null,
 "photos": 4,
 "urls": {
  "html": "https://opendesigner.dev/library/notification-inbox.html",
  "json": "https://opendesigner.dev/library/notification-inbox.json",
  "page": "https://opendesigner.dev/library/notification-inbox/"
 },
 "get": {
  "curl": "curl -fsSLo notification-inbox.html https://opendesigner.dev/library/notification-inbox.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add notification-inbox --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component notification-inbox to this project: https://opendesigner.dev/library/notification-inbox.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
