{
  "component": {
    "id": "order-summary",
    "name": "Order summary",
    "tier": "pro",
    "exampleId": "order-summary",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/order-summary-demo.tsx",
    "exportName": "OrderSummaryDemo",
    "sha256": "e8c6bb7c51ec895b994c9803b3ee3258267edae198fe5d22f6deb65102029b1a",
    "helperImports": [],
    "directComponentImports": [
      "order-summary"
    ],
    "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/order-summary",
    "registryUrl": "https://tidalui.com/r/pro/order-summary.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/order-summary",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/order-summary",
      "registryUrl": "https://tidalui.com/r/pro/order-summary.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/order-summary.tsx",
    "exports": [
      "TidalOrderSummary",
      "TidalOrderSummaryItem"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/order-summary.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "order-summary"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/order-summary.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/order-summary.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/order-summary-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useId, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { TidalOrderSummary, type TidalOrderSummaryItem } from \"./components/ui/order-summary\";\n\nimport \"./components/ui/order-summary.css\";\n\n\n\nconst tidalExampleStyles = \".order-summary-demo,\\n.order-summary-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.order-summary-demo {\\n  width: 100%;\\n  min-width: 0;\\n  container: order-demo / inline-size;\\n}\\n\\n.order-summary-demo-details {\\n  margin-top: 12px;\\n  padding: 14px 16px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 12px;\\n  background: var(--t-subtle);\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n}\\n\\n.order-summary-demo-details > span {\\n  color: var(--t-ink);\\n  font-size: 11px;\\n  font-weight: 720;\\n  letter-spacing: 0.08em;\\n  text-transform: uppercase;\\n}\\n\\n.order-summary-demo-details p {\\n  margin: 5px 0 0;\\n  overflow-wrap: anywhere;\\n}\\n\\n.order-summary-demo-complete {\\n  display: grid;\\n  width: 100%;\\n  min-height: 280px;\\n  place-items: center;\\n  align-content: center;\\n  gap: 12px;\\n  padding: 30px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 22px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  text-align: center;\\n  box-shadow: 0 30px 74px -56px #0000008f;\\n  animation: order-demo-complete 420ms var(--t-ease-out) both;\\n}\\n\\n.order-summary-demo-complete > span {\\n  display: grid;\\n  width: 56px;\\n  height: 56px;\\n  place-items: center;\\n  border-radius: 50%;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  font-size: 22px;\\n}\\n\\n.order-summary-demo-complete h3 {\\n  max-width: 16ch;\\n  margin: 4px 0 0;\\n  font-size: clamp(25px, 8cqi, 40px);\\n  font-weight: 560;\\n  letter-spacing: -0.05em;\\n  line-height: 1;\\n  overflow-wrap: anywhere;\\n}\\n\\n.order-summary-demo-complete h3:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 5px;\\n}\\n\\n.order-summary-demo-complete p {\\n  max-width: 42ch;\\n  margin: 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.55;\\n  overflow-wrap: anywhere;\\n}\\n\\n.order-summary-demo-complete button {\\n  min-width: 44px;\\n  min-height: 44px;\\n  padding: 10px 14px;\\n  border: 1px solid var(--t-ink);\\n  border-radius: 10px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  cursor: pointer;\\n  font: inherit;\\n  font-size: 11px;\\n  font-weight: 690;\\n}\\n\\n.order-summary-demo-complete button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n@container order-demo (max-width: 420px) {\\n  .order-summary-demo-complete {\\n    padding: 22px 16px;\\n  }\\n\\n  .order-summary-demo-complete button {\\n    width: 100%;\\n    font-size: 16px;\\n  }\\n}\\n\\n@media (hover: none), (pointer: coarse) {\\n  .order-summary-demo-complete button {\\n    font-size: 16px;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .order-summary-demo-complete {\\n    animation: none;\\n  }\\n}\\n\\n@keyframes order-demo-complete {\\n  from {\\n    opacity: 0;\\n    transform: translateY(12px);\\n  }\\n}\";\n\nconst SAMPLE_ITEMS: readonly TidalOrderSummaryItem[] = [\n  {\n    id: \"workspace\",\n    name: \"Workspace plan\",\n    description: \"One month in this local sample.\",\n    unitPrice: \"$29.00 each\",\n    quantity: \"1\",\n    amount: \"$29.00\",\n    media: <span aria-hidden=\"true\">W</span>,\n  },\n  {\n    id: \"contributors\",\n    name: \"Contributor seats\",\n    description: \"Two fictional sample seats.\",\n    unitPrice: \"$8.00 each\",\n    quantity: \"2\",\n    amount: \"$16.00\",\n    media: <span aria-hidden=\"true\">2</span>,\n  },\n  {\n    id: \"archive\",\n    name: \"Archive add-on\",\n    description: \"Sample document retention display.\",\n    unitPrice: \"$8.00 each\",\n    quantity: \"1\",\n    amount: \"$8.00\",\n    media: <span aria-hidden=\"true\">A</span>,\n  },\n];\n\nexport function OrderSummaryDemo() {\n  const instanceId = useId().replace(/:/g, \"\");\n  const detailsId = `order-sample-details-${instanceId}`;\n  const [creditApplied, setCreditApplied] = useState(false);\n  const [reviewed, setReviewed] = useState(false);\n  const reviewButtonRef = useRef<HTMLButtonElement>(null);\n  const completeHeadingRef = useRef<HTMLHeadingElement>(null);\n  const shouldFocusComplete = useRef(false);\n  const shouldFocusReview = useRef(false);\n\n  useLayoutEffect(() => {\n    if (!reviewed || !shouldFocusComplete.current) return;\n    shouldFocusComplete.current = false;\n    completeHeadingRef.current?.focus({ preventScroll: true });\n  }, [reviewed]);\n\n  useLayoutEffect(() => {\n    if (reviewed || !shouldFocusReview.current) return;\n    shouldFocusReview.current = false;\n    reviewButtonRef.current?.focus({ preventScroll: true });\n  }, [reviewed]);\n\n  if (reviewed) {\n    return (\n      <section className=\"order-summary-demo-complete\">\n        <span aria-hidden=\"true\">✓</span>\n        <h3 ref={completeHeadingRef} tabIndex={-1}>\n          Sample order ready for review\n        </h3>\n        <p>\n          The preview total is {creditApplied ? \"$48.00\" : \"$53.00\"}. No payment\n          or order was submitted.\n        </p>\n        <button\n          type=\"button\"\n          onClick={() => {\n            shouldFocusReview.current = true;\n            setReviewed(false);\n          }}\n        >\n          Adjust sample order\n        </button>\n      </section>\n    );\n  }\n\n  return (\n    <section className=\"order-summary-demo\" aria-label=\"Order sample preview\">\n      <TidalOrderSummary\n        title=\"Workspace order\"\n        description=\"Review a fictional workspace configuration before the sample confirmation step.\"\n        status=\"Sample prices\"\n        items={SAMPLE_ITEMS.map((item) =>\n          item.id === \"workspace\" ? { ...item, href: `#${detailsId}` } : item,\n        )}\n        rows={[\n          { id: \"subtotal\", label: \"Subtotal\", value: \"$53.00\" },\n          {\n            id: \"credit\",\n            label: \"Sample credit\",\n            detail: creditApplied ? \"Applied locally\" : \"Not applied\",\n            value: creditApplied ? \"−$5.00\" : \"$0.00\",\n            emphasis: creditApplied ? \"strong\" : \"normal\",\n          },\n        ]}\n        totalLabel=\"Sample total\"\n        totalValue={creditApplied ? \"$48.00\" : \"$53.00\"}\n        notice=\"Fictional USD display values. This preview cannot charge, order, or store payment details.\"\n        actions={[\n          {\n            kind: \"button\",\n            id: \"credit\",\n            label: creditApplied\n              ? \"Remove sample credit\"\n              : \"Apply sample credit\",\n            buttonProps: { \"aria-pressed\": creditApplied },\n            onAction: () => setCreditApplied((current) => !current),\n          },\n          {\n            kind: \"link\",\n            id: \"details\",\n            label: \"Review item details\",\n            href: `#${detailsId}`,\n          },\n          {\n            kind: \"button\",\n            id: \"review\",\n            label: \"Review sample order\",\n            emphasis: \"primary\",\n            buttonRef: reviewButtonRef,\n            onAction: () => {\n              shouldFocusComplete.current = true;\n              setReviewed(true);\n            },\n          },\n        ]}\n      />\n\n      <aside id={detailsId} className=\"order-summary-demo-details\">\n        <span>Sample item details</span>\n        <p>\n          The plan, seats, add-on, credit, and totals exist only in this local\n          preview.\n        </p>\n      </aside>\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      <OrderSummaryDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/order-summary.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [],
  "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."
    }
  ],
  "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": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "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": []
}
