{
 "id": "location-card",
 "name": "Location card",
 "purpose": "A place without a third-party map: its name and address over a drawn street pattern with a pin, how far it is, its opening hours and an Open in maps button.",
 "use_when": [
  "when an answer is one place to go: a shop, a clinic, a restaurant or a pick-up point",
  "the person asked where something is, and one place with its address and hours answers it"
 ],
 "avoid_when": [
  "several places to compare or choose from: use result-list",
  "a photo of the place is the point: use image-card",
  "a route with steps or a live map is needed: hand off to a maps app with the Open in maps event"
 ],
 "type": "content",
 "style": "quiet",
 "width": "narrow",
 "tags": {
  "audience": "consumer",
  "industries": [
   "any"
  ],
  "keywords": [
   "location",
   "address",
   "place",
   "map",
   "directions"
  ]
 },
 "root": ".odl-location-card",
 "parts": [
  {
   "name": "map",
   "selector": ".odl-map",
   "what": "a drawn street pattern in the system's neutral colours with a pin; no map tiles",
   "slot": "none"
  },
  {
   "name": "name",
   "selector": ".odl-location-card h3",
   "what": "the place's name",
   "slot": "text"
  },
  {
   "name": "address",
   "selector": "address",
   "what": "the street line, then an optional postcode and town line",
   "slot": "text"
  },
  {
   "name": "facts",
   "selector": ".odl-facts li",
   "what": "how far it is, and when it is open",
   "slot": "text"
  },
  {
   "name": "open_maps",
   "selector": ".odl-location-card button",
   "what": "hands the place to a maps app as an event, never a URL",
   "slot": "action"
  }
 ],
 "data": {
  "type": "object",
  "required": [
   "name",
   "address",
   "open_maps"
  ],
  "properties": {
   "name": {
    "type": "string",
    "maxLength": 48,
    "part": "name"
   },
   "address": {
    "type": "string",
    "maxLength": 80,
    "part": "address"
   },
   "locality": {
    "type": "string",
    "maxLength": 60,
    "part": "address"
   },
   "distance": {
    "type": "string",
    "maxLength": 40,
    "part": "facts"
   },
   "hours": {
    "type": "string",
    "maxLength": 48,
    "part": "facts"
   },
   "open_maps": {
    "type": "object",
    "part": "open_maps",
    "properties": {
     "label": {
      "type": "string",
      "maxLength": 40
     },
     "event": {
      "type": "object"
     }
    },
    "required": [
     "label",
     "event"
    ]
   }
  }
 },
 "states": {
  "shown": [
   "with distance",
   "with hours",
   "hover",
   "focus",
   "disabled"
  ],
  "edge": {
   "empty": {
    "status": "handled",
    "how": "with no distance and no hours the facts list is hidden",
    "evidence": ".odl-facts:not(:has(li)) { display: none; }"
   },
   "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 place cannot be found, say so in text or use error-retry"
   },
   "disabled": {
    "status": "shown",
    "how": "a disabled or still-loading button turns quiet neutral (secondary text on a subtle fill), still readable at AA",
    "evidence": "button:disabled { cursor: not-allowed;"
   },
   "overflow": {
    "status": "handled",
    "how": "on a phone the map gets taller and the button takes the full width",
    "evidence": "@container (max-width: 26rem)"
   },
   "long_text": {
    "status": "handled",
    "how": "name, address and facts wrap, also long words",
    "evidence": "overflow-wrap: anywhere"
   },
   "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-bg-neutral-subtle-hover",
  "--ds-color-border-focus",
  "--ds-color-border-subtle",
  "--ds-color-icon-accent",
  "--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-elevation-floating",
  "--ds-elevation-raised",
  "--ds-focus-ring-offset",
  "--ds-focus-ring-width",
  "--ds-font-weight-label",
  "--ds-icon-stroke-lg",
  "--ds-icon-stroke-md",
  "--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-md",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-inline-md",
  "--ds-space-inline-sm",
  "--ds-space-inset-lg",
  "--ds-space-inset-xl",
  "--ds-space-inset-xs",
  "--ds-space-stack-lg",
  "--ds-space-stack-sm",
  "--ds-space-stack-xs",
  "--ds-text-body-md",
  "--ds-text-label-lg",
  "--ds-text-title-md"
 ],
 "a11y": {
  "summary": "An article named by the place; the drawn map is decorative and hidden from screen readers, the address is an address element, and Open in maps is a real button.",
  "roles": [
   "article",
   "list"
  ],
  "keyboard": [
   "Tab reaches Open in maps",
   "Enter or Space presses it"
  ],
  "controls": {
   "button": 1,
   "input": 0,
   "link": 0,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/location-card/component.html",
  "bytes": 8043,
  "script": false
 },
 "source": null,
 "photos": 0,
 "urls": {
  "html": "https://opendesigner.dev/library/location-card.html",
  "json": "https://opendesigner.dev/library/location-card.json",
  "page": "https://opendesigner.dev/library/location-card/"
 },
 "get": {
  "curl": "curl -fsSLo location-card.html https://opendesigner.dev/library/location-card.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add location-card --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component location-card to this project: https://opendesigner.dev/library/location-card.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
