{
  "component": {
    "id": "duration-input",
    "name": "Duration input",
    "tier": "pro",
    "exampleId": "duration-input",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/duration-input-demo.tsx",
    "exportName": "DurationInputDemo",
    "sha256": "8e23e7cc6434492cc015bfce5f4726c01066c3eb760b55c3b8a3f29b3b2834ad",
    "helperImports": [],
    "directComponentImports": [
      "duration-input"
    ],
    "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/duration-input",
    "registryUrl": "https://tidalui.com/r/pro/duration-input.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/duration-input",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/duration-input",
      "registryUrl": "https://tidalui.com/r/pro/duration-input.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/duration-input.tsx",
    "exports": [
      "TidalDurationInput",
      "TidalDurationUnit"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/duration-input.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "duration-input"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/duration-input.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/duration-input.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/duration-input-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { TidalDurationInput, type TidalDurationUnit } from \"./components/ui/duration-input\";\n\nimport \"./components/ui/duration-input.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .duration-input-demo {\\n  container-type: inline-size;\\n  display: grid;\\n  gap: 14px;\\n  width: 100%;\\n  max-width: 620px;\\n  min-width: 0;\\n}\\n\\n.tidal-scope .duration-input-demo-actions {\\n  display: flex;\\n  flex-wrap: wrap;\\n  gap: 8px;\\n}\\n\\n.tidal-scope .duration-input-demo-actions button {\\n  min-height: 44px;\\n  min-width: 44px;\\n  padding: 8px 14px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 10px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font:\\n    500 12px/1.4 Inter,\\n    sans-serif;\\n  cursor: pointer;\\n}\\n\\n.tidal-scope .duration-input-demo-actions button:first-child {\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  border-color: var(--t-ink);\\n}\\n\\n.tidal-scope .duration-input-demo-actions button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 2px;\\n}\\n\\n.tidal-scope .duration-input-demo footer {\\n  display: grid;\\n  gap: 3px;\\n  min-width: 0;\\n  font-size: 11px;\\n  line-height: 1.55;\\n  color: var(--t-muted);\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .duration-input-demo footer output {\\n  color: var(--t-ink);\\n}\\n\\n@container (max-width: 320px) {\\n  .tidal-scope .duration-input-demo-actions button {\\n    flex: 1 1 110px;\\n  }\\n}\";\n\nconst UNITS: readonly TidalDurationUnit[] = [\n  { value: \"minutes\", label: \"Minutes\", min: \"0\", max: \"180\", step: \"5\" },\n  { value: \"hours\", label: \"Hours\", min: \"0\", max: \"72\", step: \"0.25\" },\n  { value: \"days\", label: \"Days\", min: \"0\", max: \"30\", step: \"0.5\" },\n];\n\nconst INITIAL_VALUE = \"30\";\n\nconst INITIAL_UNIT = \"minutes\";\n\nexport function DurationInputDemo() {\n  const [value, setValue] = useState(INITIAL_VALUE);\n  const [unit, setUnit] = useState(INITIAL_UNIT);\n  const [status, setStatus] = useState(\"Set the review window.\");\n\n  return (\n    <form\n      className=\"duration-input-demo\"\n      action=\"/local-duration-preview\"\n      method=\"post\"\n      onSubmit={(event) => {\n        event.preventDefault();\n        const data = new FormData(event.currentTarget);\n        setStatus(\n          `Local preview: ${String(data.get(\"durationValue\") ?? \"\")} ${String(data.get(\"durationUnit\") ?? \"\")}.`,\n        );\n      }}\n      onReset={() => {\n        setValue(INITIAL_VALUE);\n        setUnit(INITIAL_UNIT);\n        setStatus(\"The sample duration was reset.\");\n      }}\n    >\n      <TidalDurationInput\n        label=\"Review window\"\n        description=\"Choose a numeric amount and unit for this local brief. Units are not converted automatically.\"\n        value={value}\n        unit={unit}\n        units={UNITS}\n        onValueChange={(next) => {\n          setValue(next);\n          setStatus(`Value changed to ${next || \"empty\"}.`);\n        }}\n        onUnitChange={(next) => {\n          setUnit(next);\n          setStatus(`Unit changed to ${next}.`);\n        }}\n        valueInputProps={{ name: \"durationValue\", required: true }}\n        unitSelectProps={{ name: \"durationUnit\", required: true }}\n      />\n      <div className=\"duration-input-demo-actions\">\n        <button type=\"submit\">Prepare preview</button>\n        <button type=\"reset\">Reset</button>\n      </div>\n      <footer>\n        <output aria-live=\"polite\">{status}</output>\n        <span>Local sample only. Nothing is scheduled or saved.</span>\n      </footer>\n    </form>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <DurationInputDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/duration-input.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "INITIAL_VALUE",
      "setter": "setValue",
      "proposalCanBeRejected": false
    },
    {
      "prop": "unit",
      "type": "inferred-from-existing-demo",
      "initial": "INITIAL_UNIT",
      "setter": "setUnit",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onReset",
      "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."
    },
    {
      "name": "onUnitChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onValueChange",
      "nativeType": "component 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": "Existing demo label or ARIA prop",
    "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": []
}
