{
 "id": "profile-card",
 "name": "Profile card",
 "purpose": "One person at a glance: a cover photo and their portrait, who they are, where and what time it is for them, three numbers about their work, and buttons to message or follow them.",
 "use_when": [
  "for a person's profile in a team directory or hover card",
  "a card that opens when someone clicks a name, to show who they are and their local time before messaging"
 ],
 "avoid_when": [
  "a list of many people with roles: use member-list",
  "the top of a person's own full profile page: use profile-hero",
  "suggesting people to follow: use follow-suggestions"
 ],
 "type": "content",
 "style": "quiet",
 "width": "narrow",
 "tags": {
  "audience": "consumer",
  "industries": [
   "any"
  ],
  "keywords": [
   "profile",
   "person",
   "avatar",
   "team",
   "member"
  ]
 },
 "root": ".odl-profile-card",
 "parts": [
  {
   "name": "cover",
   "selector": ".odl-band",
   "what": "a decorative cover photo across the top",
   "slot": "media"
  },
  {
   "name": "avatar",
   "selector": ".odl-avatar",
   "what": "the person's portrait, overlapping the cover",
   "slot": "media"
  },
  {
   "name": "presence",
   "selector": ".odl-presence",
   "what": "their availability, as a small pill",
   "slot": "text"
  },
  {
   "name": "name",
   "selector": ".odl-name",
   "what": "the person's name, the one heading",
   "slot": "text"
  },
  {
   "name": "role",
   "selector": ".odl-role",
   "what": "job title and team",
   "slot": "text"
  },
  {
   "name": "meta",
   "selector": ".odl-meta li",
   "what": "one fact with an icon: place, or their local time",
   "slot": "list"
  },
  {
   "name": "stats",
   "selector": ".odl-stats div",
   "what": "one number about their work with its label; three in a row",
   "slot": "list"
  },
  {
   "name": "about",
   "selector": ".odl-about",
   "what": "a short note about what they do",
   "slot": "text"
  },
  {
   "name": "message",
   "selector": ".odl-message",
   "what": "the main action",
   "slot": "action"
  },
  {
   "name": "follow",
   "selector": ".odl-follow",
   "what": "a toggle between Follow and Following",
   "slot": "action"
  }
 ],
 "data": {
  "type": "object",
  "required": [
   "name",
   "avatar"
  ],
  "properties": {
   "cover": {
    "type": "string",
    "maxLength": 300,
    "part": "cover"
   },
   "avatar": {
    "type": "string",
    "maxLength": 300,
    "part": "avatar"
   },
   "presence": {
    "type": "string",
    "maxLength": 16,
    "part": "presence"
   },
   "name": {
    "type": "string",
    "maxLength": 32,
    "part": "name"
   },
   "role": {
    "type": "string",
    "maxLength": 60,
    "part": "role"
   },
   "meta": {
    "type": "array",
    "minItems": 0,
    "maxItems": 3,
    "part": "meta",
    "items": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "icon": {
       "enum": [
        "place",
        "time"
       ]
      },
      "text": {
       "type": "string",
       "maxLength": 28
      }
     }
    }
   },
   "stats": {
    "type": "array",
    "minItems": 3,
    "maxItems": 3,
    "part": "stats",
    "items": {
     "type": "object",
     "required": [
      "label",
      "value"
     ],
     "properties": {
      "label": {
       "type": "string",
       "maxLength": 12
      },
      "value": {
       "type": "string",
       "maxLength": 6
      }
     }
    }
   },
   "about": {
    "type": "string",
    "maxLength": 160,
    "part": "about"
   },
   "following": {
    "type": "boolean",
    "part": "follow"
   },
   "actions": {
    "type": "object",
    "properties": {
     "message": {
      "type": "string",
      "maxLength": 12,
      "part": "message"
     }
    }
   }
  }
 },
 "states": {
  "shown": [
   "hover",
   "pressed",
   "focus",
   "following",
   "not following"
  ],
  "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 profile fails to load, keep the cover and put an alert-banners line in the body with a retry"
   },
   "disabled": {
    "status": "not_built",
    "how": "when the viewer cannot message this person, set disabled on Message and say why in the about line"
   },
   "overflow": {
    "status": "handled",
    "how": "place and local time wrap onto their own lines when there is no room side by side",
    "evidence": ".odl-meta { display: flex; flex-wrap: wrap"
   },
   "long_text": {
    "status": "handled",
    "how": "name, role and about wrap; the presence pill never breaks",
    "evidence": "font: var(--ds-text-label-md); white-space: nowrap; }"
   },
   "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-4",
  "--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-icon-subtle",
  "--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-elevation-raised",
  "--ds-focus-ring-offset",
  "--ds-focus-ring-width",
  "--ds-font-weight-heading",
  "--ds-font-weight-label",
  "--ds-icon-stroke-md",
  "--ds-motion-duration-short",
  "--ds-motion-easing-standard",
  "--ds-radius-container",
  "--ds-radius-control",
  "--ds-radius-full",
  "--ds-radius-person",
  "--ds-size-control-md",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-2",
  "--ds-space-4",
  "--ds-space-64",
  "--ds-space-8",
  "--ds-space-inline-md",
  "--ds-space-inline-sm",
  "--ds-space-inset-lg",
  "--ds-space-inset-md",
  "--ds-space-inset-xl",
  "--ds-space-inset-xs",
  "--ds-space-stack-lg",
  "--ds-space-stack-md",
  "--ds-space-stack-xs",
  "--ds-text-body-md",
  "--ds-text-body-sm",
  "--ds-text-label-lg",
  "--ds-text-label-md",
  "--ds-text-numeric-md",
  "--ds-text-title-lg"
 ],
 "a11y": {
  "summary": "An article labelled with the person's name; the portrait has the person's name as alt text and the cover is decorative; the stats are a description list, and Follow is a toggle button that reports its state with aria-pressed.",
  "roles": [
   "article",
   "banner",
   "list"
  ],
  "keyboard": [
   "Tab reaches Message, then Follow",
   "Enter or Space presses the focused button; Follow switches to Following and back",
   "Message is a button, but the file wires no action to it"
  ],
  "controls": {
   "button": 2,
   "input": 0,
   "link": 0,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/profile-card/component.html",
  "bytes": 11141,
  "script": true
 },
 "source": null,
 "photos": 2,
 "urls": {
  "html": "https://opendesigner.dev/library/profile-card.html",
  "json": "https://opendesigner.dev/library/profile-card.json",
  "page": "https://opendesigner.dev/library/profile-card/"
 },
 "get": {
  "curl": "curl -fsSLo profile-card.html https://opendesigner.dev/library/profile-card.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add profile-card --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component profile-card to this project: https://opendesigner.dev/library/profile-card.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
