{
  "component": {
    "id": "sign-in-form",
    "name": "Sign-in form",
    "tier": "pro",
    "exampleId": "sign-in-form",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/sign-in-form-demo.tsx",
    "exportName": "SignInFormDemo",
    "sha256": "2aa7182211cf34e543074b800458c92063e98fccef13870c74094f54e654ea9e",
    "helperImports": [],
    "directComponentImports": [
      "sign-in-form"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/sign-in-form",
    "registryUrl": "https://tidalui.com/r/pro/sign-in-form.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/sign-in-form",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/sign-in-form",
      "registryUrl": "https://tidalui.com/r/pro/sign-in-form.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/sign-in-form.tsx",
    "exports": [
      "TidalSignInForm"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/sign-in-form.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "@radix-ui/react-compose-refs@1.1.5",
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "sign-in-form"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/sign-in-form.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/sign-in-form.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/sign-in-form-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useEffect, useLayoutEffect, useRef, useState, type FormEvent } from \"react\";\n\nimport { CheckCircle2, FileCheck2, RotateCcw } from \"lucide-react\";\n\nimport { TidalSignInForm } from \"./components/ui/sign-in-form\";\n\nimport \"./components/ui/sign-in-form.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .sign-in-demo-specimen {\\n  width: 100%;\\n  max-width: 680px;\\n  min-width: 0;\\n  overflow: hidden;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-subtle);\\n  color: var(--t-ink);\\n  box-shadow: 0 24px 48px -36px #00000052;\\n  container-type: inline-size;\\n}\\n\\n.tidal-scope .sign-in-demo-layout {\\n  display: grid;\\n  grid-template-columns: minmax(0, 1fr);\\n  min-width: 0;\\n}\\n\\n.tidal-scope .sign-in-demo-specimen,\\n.tidal-scope .sign-in-demo-specimen * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .sign-in-demo-kicker {\\n  display: block;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  font-weight: 600;\\n  letter-spacing: 1px;\\n  line-height: 1.4;\\n}\\n\\n.tidal-scope .sign-in-demo-stage {\\n  display: grid;\\n  place-items: center;\\n  min-width: 0;\\n  padding: 28px;\\n  background:\\n    linear-gradient(var(--t-border) 1px, transparent 1px),\\n    linear-gradient(90deg, var(--t-border) 1px, transparent 1px),\\n    var(--t-subtle);\\n  background-size: 22px 22px;\\n}\\n\\n.tidal-scope .sign-in-demo-stage > .tidal-sign-in-form {\\n  max-width: 450px;\\n}\\n\\n.tidal-scope .sign-in-demo-prepared {\\n  width: 100%;\\n  max-width: 450px;\\n  padding: 42px 31px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-surface);\\n  text-align: center;\\n  box-shadow: 0 22px 44px -34px #0000004a;\\n}\\n\\n.tidal-scope .sign-in-demo-prepared-icon {\\n  position: relative;\\n  display: grid;\\n  place-items: center;\\n  width: 58px;\\n  height: 58px;\\n  margin: 0 auto 24px;\\n  border-radius: 15px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  transform: rotate(-4deg);\\n}\\n\\n.tidal-scope .sign-in-demo-prepared-icon > svg:last-child {\\n  position: absolute;\\n  inset-inline-end: -5px;\\n  bottom: -5px;\\n  box-sizing: content-box;\\n  padding: 4px;\\n  border: 3px solid var(--t-surface);\\n  border-radius: 50%;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n}\\n\\n.tidal-scope .sign-in-demo-prepared h3 {\\n  margin: 12px 0 11px;\\n  color: var(--t-ink);\\n  font-size: 25px;\\n  font-weight: 500;\\n  line-height: 1.15;\\n  letter-spacing: -0.8px;\\n  text-wrap: balance;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .sign-in-demo-prepared h3:focus {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 5px;\\n  border-radius: 4px;\\n}\\n\\n.tidal-scope .sign-in-demo-prepared > p {\\n  max-width: 330px;\\n  margin: 0 auto 24px;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.7;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .sign-in-demo-prepared > button {\\n  display: inline-flex;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 8px;\\n  min-height: 44px;\\n  padding: 9px 14px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 10px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: inherit;\\n  font-size: 11px;\\n  cursor: pointer;\\n  transition:\\n    background 160ms,\\n    transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .sign-in-demo-prepared > button:hover {\\n  background: var(--t-wash);\\n}\\n\\n.tidal-scope .sign-in-demo-prepared > button:active {\\n  transform: scale(0.98);\\n}\\n\\n.tidal-scope .sign-in-demo-prepared > button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n@container (max-width: 390px) {\\n  .tidal-scope .sign-in-demo-stage {\\n    padding: 12px;\\n    background-size: 18px 18px;\\n  }\\n\\n  .tidal-scope .sign-in-demo-prepared {\\n    padding: 34px 21px;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: no-preference) {\\n  .tidal-scope .sign-in-demo-prepared {\\n    animation: sign-in-demo-enter 430ms var(--t-ease-out) both;\\n  }\\n\\n  .tidal-scope .sign-in-demo-prepared-icon {\\n    animation: sign-in-demo-icon 460ms var(--t-ease-spring) both;\\n  }\\n}\\n\\n@keyframes sign-in-demo-enter {\\n  from {\\n    opacity: 0;\\n    transform: translateY(7px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: none;\\n  }\\n}\\n\\n@keyframes sign-in-demo-icon {\\n  from {\\n    opacity: 0;\\n    transform: scale(0.7) rotate(-13deg);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: scale(1) rotate(-4deg);\\n  }\\n}\";\n\ntype DemoPhase = \"ready\" | \"checking\" | \"prepared\";\n\nexport function SignInFormDemo() {\n  const [email, setEmail] = useState(\"\");\n  const [password, setPassword] = useState(\"\");\n  const [emailError, setEmailError] = useState(\"\");\n  const [passwordError, setPasswordError] = useState(\"\");\n  const [phase, setPhase] = useState<DemoPhase>(\"ready\");\n  const emailInput = useRef<HTMLInputElement>(null);\n  const preparedHeading = useRef<HTMLHeadingElement>(null);\n  const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n  const restoreEmailFocus = useRef(false);\n  const focusOwner = useRef<HTMLElement | null>(null);\n\n  useEffect(() => () => clearTimeout(timer.current), []);\n\n  useLayoutEffect(() => {\n    if (phase === \"prepared\") {\n      const active = document.activeElement;\n      if (active === document.body || active === focusOwner.current)\n        preparedHeading.current?.focus({ preventScroll: true });\n      focusOwner.current = null;\n    } else if (phase === \"ready\" && restoreEmailFocus.current) {\n      restoreEmailFocus.current = false;\n      emailInput.current?.focus({ preventScroll: true });\n    }\n  }, [phase]);\n\n  function reset() {\n    clearTimeout(timer.current);\n    timer.current = undefined;\n    focusOwner.current = null;\n    setEmail(\"\");\n    setPassword(\"\");\n    setEmailError(\"\");\n    setPasswordError(\"\");\n    restoreEmailFocus.current = true;\n    setPhase(\"ready\");\n  }\n\n  function cancelPreparationOnEdit() {\n    if (phase !== \"checking\") return;\n    clearTimeout(timer.current);\n    timer.current = undefined;\n    focusOwner.current = null;\n    setPhase(\"ready\");\n  }\n\n  function handleSubmit(event: FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    clearTimeout(timer.current);\n    focusOwner.current =\n      (event.nativeEvent as SubmitEvent).submitter instanceof HTMLElement\n        ? (event.nativeEvent as SubmitEvent).submitter\n        : document.activeElement instanceof HTMLElement\n          ? document.activeElement\n          : null;\n    setEmailError(\"\");\n    setPasswordError(\"\");\n    setPhase(\"checking\");\n    timer.current = setTimeout(() => {\n      timer.current = undefined;\n      setEmail(\"\");\n      setPassword(\"\");\n      setPhase(\"prepared\");\n    }, 680);\n  }\n\n  return (\n    <section className=\"sign-in-demo-specimen\" data-phase={phase}>\n      <div className=\"sign-in-demo-layout\">\n        <div className=\"sign-in-demo-stage\">\n          {phase === \"prepared\" ? (\n            <div className=\"sign-in-demo-prepared\">\n              <span className=\"sign-in-demo-prepared-icon\" aria-hidden=\"true\">\n                <FileCheck2 size={24} />\n                <CheckCircle2 size={15} />\n              </span>\n              <span className=\"sign-in-demo-kicker\">LOCAL CHECK COMPLETE</span>\n              <h3 ref={preparedHeading} tabIndex={-1}>\n                Form prepared locally.\n              </h3>\n              <p>\n                The sample passed browser validation. No account was checked, no\n                sign-in happened, and no values were saved.\n              </p>\n              <button type=\"button\" onClick={reset}>\n                <RotateCcw size={16} aria-hidden=\"true\" />\n                Return to form\n              </button>\n            </div>\n          ) : (\n            <TidalSignInForm\n              title=\"Sign in to your workspace\"\n              description=\"Enter your account details to continue.\"\n              headingLevel=\"h3\"\n              emailRef={emailInput}\n              emailError={emailError}\n              passwordError={passwordError}\n              busy={phase === \"checking\"}\n              busyLabel=\"Preparing form\"\n              submitLabel=\"Continue\"\n              onSubmit={handleSubmit}\n              emailInputProps={{\n                value: email,\n                placeholder: \"name@example.com\",\n                inputMode: \"email\",\n                onChange: (event: import(\"react\").ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n                  cancelPreparationOnEdit();\n                  setEmail(event.target.value);\n                  setEmailError(\"\");\n                },\n                onInvalid: (event: import(\"react\").InvalidEvent<HTMLInputElement>) => {\n                  const input = event.currentTarget;\n                  setEmailError(\n                    input.validity.valueMissing\n                      ? \"Enter an email address to continue.\"\n                      : \"Use an email address in the format name@example.com.\",\n                  );\n                },\n              }}\n              passwordInputProps={{\n                value: password,\n                placeholder: \"Sample only\",\n                onChange: (event: import(\"react\").ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n                  cancelPreparationOnEdit();\n                  setPassword(event.target.value);\n                  setPasswordError(\"\");\n                },\n                onInvalid: () => {\n                  setPasswordError(\"Enter a sample password to continue.\");\n                },\n              }}\n              footer={\n                <span>\n                  Preview only. Authentication and account recovery are not\n                  connected.\n                </span>\n              }\n            />\n          )}\n        </div>\n      </div>\n    </section>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <SignInFormDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/sign-in-form.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "phase",
      "type": "inferred-from-existing-demo",
      "initial": "\"ready\"",
      "setter": "setPhase",
      "proposalCanBeRejected": false
    },
    {
      "prop": "emailError",
      "type": "inferred-from-existing-demo",
      "initial": "\"\"",
      "setter": "setEmailError",
      "proposalCanBeRejected": false
    },
    {
      "prop": "passwordError",
      "type": "inferred-from-existing-demo",
      "initial": "\"\"",
      "setter": "setPasswordError",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onSubmit",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Consumer-provided label remains required where the component API requires one.",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "The existing error or alert path remains consumer-owned and should be announced by the rendered semantics.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
