{
 "id": "sign-in-form",
 "name": "Sign-in form",
 "purpose": "Work email and password with show and hide, remember this device, and a single sign-on option, shown with a wrong-password error.",
 "use_when": [
  "on a work app's sign-in page",
  "a work tool where people sign in with a password or through their company's single sign-on"
 ],
 "avoid_when": [
  "entering a one-time code sent by email or text: use code-input",
  "creating a new account or inviting people: use invite-members for invites; this form only signs in",
  "a consumer app that signs in with one tap only: this form leads with email and password"
 ],
 "type": "form",
 "style": "quiet",
 "width": "narrow",
 "tags": {
  "audience": "work",
  "industries": [
   "saas",
   "any"
  ],
  "keywords": [
   "sign in",
   "login",
   "password",
   "sso",
   "auth"
  ]
 },
 "root": ".odl-sign-in-form",
 "parts": [
  {
   "name": "title",
   "selector": ".odl-head h2",
   "what": "what the person is signing in to, the one heading",
   "slot": "text"
  },
  {
   "name": "hint",
   "selector": ".odl-head p",
   "what": "a short line on which email to use",
   "slot": "text"
  },
  {
   "name": "email",
   "selector": "#odl-sif-email",
   "what": "the work email field with its label",
   "slot": "input"
  },
  {
   "name": "forgot",
   "selector": ".odl-label-row a",
   "what": "the link to reset the password, beside its label",
   "slot": "action"
  },
  {
   "name": "password",
   "selector": "#odl-sif-pass",
   "what": "the password field with its label",
   "slot": "input"
  },
  {
   "name": "reveal",
   "selector": ".odl-reveal",
   "what": "shows or hides the password",
   "slot": "action"
  },
  {
   "name": "error",
   "selector": ".odl-error",
   "what": "the message under the password when sign-in fails, after an icon",
   "slot": "text"
  },
  {
   "name": "remember",
   "selector": ".odl-check",
   "what": "remember this device, with how long",
   "slot": "input"
  },
  {
   "name": "submit",
   "selector": ".odl-primary",
   "what": "the main action",
   "slot": "action"
  },
  {
   "name": "sso",
   "selector": ".odl-secondary",
   "what": "the single sign-on option, under an 'or' divider",
   "slot": "action"
  },
  {
   "name": "foot",
   "selector": ".odl-foot",
   "what": "a line for people without an account, with a link",
   "slot": "rich"
  }
 ],
 "data": {
  "type": "object",
  "required": [
   "title"
  ],
  "properties": {
   "title": {
    "type": "string",
    "maxLength": 40,
    "part": "title"
   },
   "hint": {
    "type": "string",
    "maxLength": 80,
    "part": "hint"
   },
   "email_label": {
    "type": "string",
    "maxLength": 20,
    "part": "email"
   },
   "password_label": {
    "type": "string",
    "maxLength": 16,
    "part": "password"
   },
   "forgot_label": {
    "type": "string",
    "maxLength": 20,
    "part": "forgot"
   },
   "error": {
    "type": "string",
    "maxLength": 120,
    "part": "error"
   },
   "remember": {
    "type": "object",
    "part": "remember",
    "properties": {
     "label": {
      "type": "string",
      "maxLength": 24
     },
     "note": {
      "type": "string",
      "maxLength": 14
     },
     "checked": {
      "type": "boolean"
     }
    }
   },
   "submit_label": {
    "type": "string",
    "maxLength": 16,
    "part": "submit"
   },
   "sso_label": {
    "type": "string",
    "maxLength": 32,
    "part": "sso"
   },
   "foot": {
    "type": "object",
    "part": "foot",
    "properties": {
     "text": {
      "type": "string",
      "maxLength": 24
     },
     "link": {
      "type": "string",
      "maxLength": 28
     },
     "href": {
      "type": "string",
      "maxLength": 200
     }
    }
   },
   "remember_label": {
    "type": "string",
    "maxLength": 80
   },
   "remember_note": {
    "type": "string",
    "maxLength": 80
   },
   "foot_text": {
    "type": "string",
    "maxLength": 80
   },
   "foot_link": {
    "type": "string",
    "maxLength": 80
   }
  }
 },
 "states": {
  "shown": [
   "hover",
   "focus",
   "error",
   "password shown",
   "checked"
  ],
  "edge": {
   "empty": {
    "status": "not_built",
    "how": "start with both fields blank; if Sign in is pressed with one empty, add the invalid style to that field and an error line under it"
   },
   "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": "shown",
    "how": "a wrong password gives the field a red border and a message tied to it",
    "evidence": ".odl-field:has(> .odl-error) .odl-control { border-color: var(--ds-color-border-danger); }"
   },
   "disabled": {
    "status": "not_built",
    "how": "after too many tries, set disabled on the password field and Sign in, and say when to try again in the error line"
   },
   "overflow": {
    "status": "handled",
    "how": "in a very narrow box the Show button drops its word and keeps the icon",
    "evidence": "@container (max-width: 300px) { .odl-sign-in-form .odl-reveal span { display: none; } }"
   },
   "long_text": {
    "status": "handled",
    "how": "a long email scrolls inside its field, and the error wraps beside its icon",
    "evidence": ".odl-control input { flex: 1; min-inline-size: 0"
   },
   "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-field",
  "--ds-color-bg-neutral-subtle-hover",
  "--ds-color-border-danger",
  "--ds-color-border-default",
  "--ds-color-border-focus",
  "--ds-color-border-input",
  "--ds-color-border-separator",
  "--ds-color-border-strong",
  "--ds-color-border-subtle",
  "--ds-color-surface-raised",
  "--ds-color-text-danger",
  "--ds-color-text-link",
  "--ds-color-text-on-action",
  "--ds-color-text-primary",
  "--ds-color-text-secondary",
  "--ds-color-text-tertiary",
  "--ds-elevation-raised",
  "--ds-focus-ring-offset",
  "--ds-focus-ring-width",
  "--ds-font-weight-body",
  "--ds-font-weight-label",
  "--ds-icon-stroke-md",
  "--ds-motion-duration-short",
  "--ds-motion-easing-standard",
  "--ds-radius-container",
  "--ds-radius-control",
  "--ds-radius-control-sm",
  "--ds-radius-detail",
  "--ds-size-control-md",
  "--ds-size-control-sm",
  "--ds-size-icon-sm",
  "--ds-size-target-min",
  "--ds-space-2",
  "--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-stack-lg",
  "--ds-space-stack-sm",
  "--ds-text-body-md",
  "--ds-text-label-lg",
  "--ds-text-label-md",
  "--ds-text-title-lg"
 ],
 "a11y": {
  "summary": "Each input has a visible label; the error is tied to the password with aria-describedby and aria-invalid, and the show button is a toggle with aria-pressed.",
  "roles": [
   "form",
   "region",
   "separator"
  ],
  "keyboard": [
   "Tab reaches the email field, Forgot password, the password field, Show, Remember this device, Sign in, Continue with single sign-on, then the invite link",
   "Enter or Space on Show switches the password between hidden and shown",
   "Space ticks or unticks Remember this device",
   "Enter in a field submits the form, but the file stops the submit and does nothing else",
   "Continue with single sign-on is a button with no action wired in the file"
  ],
  "controls": {
   "button": 3,
   "input": 3,
   "link": 2,
   "select": 0,
   "textarea": 0,
   "summary": 0
  },
  "focus_visible": true,
  "reduced_motion": true,
  "min_target": true
 },
 "files": {
  "html": "components/sign-in-form/component.html",
  "bytes": 11197,
  "script": true
 },
 "source": null,
 "photos": 0,
 "urls": {
  "html": "https://opendesigner.dev/library/sign-in-form.html",
  "json": "https://opendesigner.dev/library/sign-in-form.json",
  "page": "https://opendesigner.dev/library/sign-in-form/"
 },
 "get": {
  "curl": "curl -fsSLo sign-in-form.html https://opendesigner.dev/library/sign-in-form.html",
  "opendesigner": "python3 path/to/skills/opendesigner/scripts/library.py add sign-in-form --from https://opendesigner.dev",
  "prompt": "Add the OpenDesigner component sign-in-form to this project: https://opendesigner.dev/library/sign-in-form.html. Keep its markup and states; map its --ds-* variables to my tokens."
 }
}
