{
  "component": {
    "id": "fieldset",
    "name": "Fieldset",
    "tier": "pro",
    "exampleId": "fieldset",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/fieldset-demo.tsx",
    "exportName": "FieldsetDemo",
    "sha256": "b36175774784bfa87c7e3cc012fd5430637a0261532b35d38c15be9f62c59428",
    "helperImports": [],
    "directComponentImports": [
      "fieldset"
    ],
    "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/fieldset",
    "registryUrl": "https://tidalui.com/r/pro/fieldset.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/fieldset",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/fieldset",
      "registryUrl": "https://tidalui.com/r/pro/fieldset.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/fieldset.tsx",
    "exports": [
      "TidalFieldset"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/fieldset.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "fieldset"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/fieldset.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/fieldset.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/fieldset-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useId, useRef, useState, type FormEvent } from \"react\";\n\nimport { TidalFieldset } from \"./components/ui/fieldset\";\n\nimport \"./components/ui/fieldset.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .fieldset-demo {\\n  container: fieldset-demo / inline-size;\\n  width: min(100%, 560px);\\n  min-width: 0;\\n  color: var(--t-ink);\\n}\\n\\n.tidal-scope .fieldset-demo form {\\n  display: grid;\\n  gap: 22px;\\n}\\n\\n.tidal-scope .fieldset-demo-footer {\\n  display: flex;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 14px;\\n  min-width: 0;\\n}\\n\\n.tidal-scope .fieldset-demo-footer > p {\\n  min-width: 0;\\n  margin: 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.55;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .fieldset-demo-footer > div {\\n  display: flex;\\n  flex: none;\\n  gap: 8px;\\n}\\n\\n.tidal-scope .fieldset-demo-footer button {\\n  min-height: 44px;\\n  padding: 9px 14px;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-control);\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: inherit;\\n  font-size: 12px;\\n  font-weight: 640;\\n  cursor: pointer;\\n  transition:\\n    color 140ms,\\n    background-color 140ms,\\n    transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .fieldset-demo-footer button[type=\\\"submit\\\"] {\\n  border-color: var(--t-ink);\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n\\n.tidal-scope .fieldset-demo-footer button:hover {\\n  border-color: var(--t-ink);\\n}\\n\\n.tidal-scope .fieldset-demo-footer button[type=\\\"submit\\\"]:hover {\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n}\\n\\n.tidal-scope .fieldset-demo-footer button:active {\\n  transform: scale(0.98);\\n}\\n\\n.tidal-scope .fieldset-demo-footer button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n@container fieldset-demo (max-width: 420px) {\\n  .tidal-scope .fieldset-demo-footer {\\n    align-items: stretch;\\n    flex-direction: column;\\n  }\\n\\n  .tidal-scope .fieldset-demo-footer > div {\\n    display: grid;\\n    grid-template-columns: repeat(2, minmax(0, 1fr));\\n  }\\n}\\n\\n@container fieldset-demo (max-width: 280px) {\\n  .tidal-scope .fieldset-demo-footer > div {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  \\n  .tidal-scope .fieldset-demo-footer button {\\n    transition: none;\\n  }\\n\\n  \\n  .tidal-scope .fieldset-demo-footer button:active {\\n    transform: none;\\n  }\\n}\";\n\nexport function FieldsetDemo() {\n  const generatedId = useId().replace(/:/g, \"\");\n  const fieldsetRef = useRef<HTMLFieldSetElement>(null);\n  const firstRadioRef = useRef<HTMLInputElement>(null);\n  const [day, setDay] = useState(\"\");\n  const [includeCompleted, setIncludeCompleted] = useState(false);\n  const [error, setError] = useState(\"\");\n  const [status, setStatus] = useState(\n    \"Choose a day for the fictional review summary.\",\n  );\n\n  function submitSample(event: FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    if (!day) {\n      setError(\"Choose Monday or Friday.\");\n      firstRadioRef.current?.focus({ preventScroll: true });\n      return;\n    }\n    setError(\"\");\n    setStatus(\n      `Local summary preview: ${day}${includeCompleted ? \", including completed work\" : \"\"}.`,\n    );\n  }\n\n  return (\n    <section className=\"fieldset-demo\" aria-label=\"Fieldset preview\">\n      <form\n        onSubmit={submitSample}\n        onReset={() => {\n          setDay(\"\");\n          setIncludeCompleted(false);\n          setError(\"\");\n          setStatus(\"The local sample was reset.\");\n        }}\n        noValidate\n      >\n        <TidalFieldset\n          ref={fieldsetRef}\n          legend=\"Weekly review\"\n          requirement=\"Choose one\"\n          description=\"Group related controls under one native legend.\"\n          error={error || undefined}\n          contentProps={{ className: \"fieldset-demo-options\" }}\n        >\n          <label>\n            <input\n              ref={firstRadioRef}\n              type=\"radio\"\n              name={`${generatedId}-review-day`}\n              value=\"Monday\"\n              required\n              checked={day === \"Monday\"}\n              onChange={(event) => {\n                setDay(event.currentTarget.value);\n                setError(\"\");\n                setStatus(\"The sample review day changed locally.\");\n              }}\n            />\n            <span>\n              <strong>Monday</strong>\n              <small>Start the week with active work.</small>\n            </span>\n          </label>\n          <label>\n            <input\n              type=\"radio\"\n              name={`${generatedId}-review-day`}\n              value=\"Friday\"\n              required\n              checked={day === \"Friday\"}\n              onChange={(event) => {\n                setDay(event.currentTarget.value);\n                setError(\"\");\n                setStatus(\"The sample review day changed locally.\");\n              }}\n            />\n            <span>\n              <strong>Friday</strong>\n              <small>Close the week with a short recap.</small>\n            </span>\n          </label>\n          <label data-kind=\"checkbox\">\n            <input\n              type=\"checkbox\"\n              name=\"include-completed\"\n              checked={includeCompleted}\n              onChange={(event) => {\n                setIncludeCompleted(event.currentTarget.checked);\n                setStatus(\"The local sample options changed.\");\n              }}\n            />\n            <span>Include completed work</span>\n          </label>\n        </TidalFieldset>\n\n        <div className=\"fieldset-demo-footer\">\n          <p role=\"status\" aria-live=\"polite\">\n            {status}\n          </p>\n          <div>\n            <button type=\"reset\">Reset</button>\n            <button type=\"submit\">Review sample</button>\n          </div>\n        </div>\n      </form>\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      <FieldsetDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/fieldset.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "checked",
      "type": "inferred-from-existing-demo",
      "initial": "false",
      "setter": "setIncludeCompleted",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onChange",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onReset",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "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": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [
      "include-completed"
    ],
    "expectedFormData": {
      "include-completed": "fixture value"
    },
    "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": []
}
