{
  "component": {
    "id": "billing-overview",
    "name": "Billing overview",
    "tier": "pro",
    "exampleId": "billing-overview",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/billing-overview-demo.tsx",
    "exportName": "BillingOverviewDemo",
    "sha256": "c0dccf34a4fccef620debd28d96bc6ed2848df5e1a01fa71576d2154cbb8fc94",
    "helperImports": [],
    "directComponentImports": [
      "billing-overview"
    ],
    "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/billing-overview",
    "registryUrl": "https://tidalui.com/r/pro/billing-overview.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/billing-overview",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/billing-overview",
      "registryUrl": "https://tidalui.com/r/pro/billing-overview.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/billing-overview.tsx",
    "exports": [
      "TidalBillingAllowance",
      "TidalBillingInvoice",
      "TidalBillingOverview"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/billing-overview.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "billing-overview"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/billing-overview.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/billing-overview.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/billing-overview-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useId, useMemo, useState } from \"react\";\n\nimport { TidalBillingOverview, type TidalBillingAllowance, type TidalBillingInvoice } from \"./components/ui/billing-overview\";\n\nimport \"./components/ui/billing-overview.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .billing-overview-demo,\\n.tidal-scope .billing-overview-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .billing-overview-demo {\\n  width: 100%;\\n  max-width: 1160px;\\n  min-width: 0;\\n  container: billing-overview-demo / inline-size;\\n}\\n\\n.tidal-scope .billing-overview-demo-frame {\\n  display: grid;\\n  width: 100%;\\n  min-width: 0;\\n  gap: 13px;\\n  padding: 20px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 22px;\\n  background: var(--t-subtle);\\n  color: var(--t-ink);\\n}\\n\\n.tidal-scope .billing-overview-demo-details {\\n  display: grid;\\n  grid-template-columns: repeat(2, minmax(0, 1fr));\\n  gap: 10px;\\n}\\n\\n.tidal-scope .billing-overview-demo-details article {\\n  min-width: 0;\\n  padding: 18px 20px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-surface);\\n  scroll-margin-block: 18px;\\n}\\n\\n.tidal-scope .billing-overview-demo-details article:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .billing-overview-demo-details article > span {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  font-weight: 680;\\n  letter-spacing: 0.09em;\\n  line-height: 1.35;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .billing-overview-demo-details h3 {\\n  margin: 7px 0 0;\\n  font-size: 17px;\\n  font-weight: 650;\\n  letter-spacing: -0.035em;\\n  line-height: 1.25;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .billing-overview-demo-details p {\\n  margin: 7px 0 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.55;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .billing-overview-demo-details dl {\\n  display: flex;\\n  gap: 18px;\\n  margin: 13px 0 0;\\n}\\n\\n.tidal-scope .billing-overview-demo-details dl > div {\\n  min-width: 0;\\n}\\n\\n.tidal-scope .billing-overview-demo-details dt {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.35;\\n}\\n\\n.tidal-scope .billing-overview-demo-details dd {\\n  margin: 3px 0 0;\\n  font-size: 11px;\\n  line-height: 1.4;\\n  overflow-wrap: anywhere;\\n}\\n\\n@container billing-overview-demo (max-width: 520px) {\\n  .tidal-scope .billing-overview-demo-frame {\\n    gap: 9px;\\n    padding: 8px;\\n  }\\n\\n  .tidal-scope .billing-overview-demo-details {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n\\n  .tidal-scope .billing-overview-demo-details article {\\n    padding: 16px;\\n  }\\n}\";\n\nconst PERIOD_ALLOWANCES: Record<\n  \"current\" | \"previous\",\n  readonly TidalBillingAllowance[]\n> = {\n  current: [\n    {\n      id: \"briefs\",\n      label: \"Sample briefs\",\n      valueLabel: \"18 of 30\",\n      used: 18,\n      limit: 30,\n      description: \"Fictional allowance for the current preview period.\",\n    },\n    {\n      id: \"exports\",\n      label: \"Sample exports\",\n      valueLabel: \"7 of 20\",\n      used: 7,\n      limit: 20,\n      description: \"Local display data with no metered service attached.\",\n    },\n    {\n      id: \"review-hours\",\n      label: \"Review hours\",\n      valueLabel: \"12 of 40\",\n      used: 12,\n      limit: 40,\n      description: \"A fictional time allowance for layout review.\",\n    },\n    {\n      id: \"archive-space\",\n      label: \"Archive space\",\n      valueLabel: \"4.2 of 10 GB\",\n      used: 4.2,\n      limit: 10,\n      description: \"No file storage is measured by this preview.\",\n    },\n  ],\n  previous: [\n    {\n      id: \"briefs\",\n      label: \"Sample briefs\",\n      valueLabel: \"24 of 30\",\n      used: 24,\n      limit: 30,\n      description: \"Fictional allowance for the previous preview period.\",\n    },\n    {\n      id: \"exports\",\n      label: \"Sample exports\",\n      valueLabel: \"15 of 20\",\n      used: 15,\n      limit: 20,\n      description: \"Local display data with no metered service attached.\",\n    },\n    {\n      id: \"review-hours\",\n      label: \"Review hours\",\n      valueLabel: \"31 of 40\",\n      used: 31,\n      limit: 40,\n      description: \"A fictional time allowance for layout review.\",\n    },\n    {\n      id: \"archive-space\",\n      label: \"Archive space\",\n      valueLabel: \"6.8 of 10 GB\",\n      used: 6.8,\n      limit: 10,\n      description: \"No file storage is measured by this preview.\",\n    },\n  ],\n};\n\ninterface InvoiceSeed {\n  id: string;\n  label: string;\n  accessibleLabel: string;\n  date: string;\n  total: string;\n  status: string;\n  note: string;\n}\n\nconst INVOICES: readonly InvoiceSeed[] = [\n  {\n    id: \"sample-1048\",\n    label: \"Sample invoice 1048\",\n    accessibleLabel: \"Sample invoice 1048\",\n    date: \"October 1 sample\",\n    total: \"$24.00 fictional\",\n    status: \"Preview only\",\n    note: \"A fictional monthly plan line with no payment transaction.\",\n  },\n  {\n    id: \"sample-1036\",\n    label: \"Sample invoice 1036\",\n    accessibleLabel: \"Sample invoice 1036\",\n    date: \"September 1 sample\",\n    total: \"$24.00 fictional\",\n    status: \"Preview only\",\n    note: \"A local invoice preview supplied directly to the component.\",\n  },\n  {\n    id: \"sample-1024\",\n    label: \"Sample invoice 1024\",\n    accessibleLabel: \"Sample invoice 1024\",\n    date: \"August 1 sample\",\n    total: \"$24.00 fictional\",\n    status: \"Preview only\",\n    note: \"No receipt, charge, account, or downloadable document exists.\",\n  },\n];\n\nexport function BillingOverviewDemo() {\n  const generatedId = useId().replace(/:/g, \"\");\n  const planDetailId = `billing-${generatedId}-plan-detail`;\n  const invoicePreviewId = `billing-${generatedId}-invoice-preview`;\n  const [period, setPeriod] = useState<\"current\" | \"previous\">(\"current\");\n  const [planDetailsShown, setPlanDetailsShown] = useState(false);\n  const [selectedInvoiceId, setSelectedInvoiceId] = useState<string | null>(\n    null,\n  );\n  const [message, setMessage] = useState(\n    \"Current fictional usage period selected.\",\n  );\n\n  const invoices = useMemo<readonly TidalBillingInvoice[]>(\n    () =>\n      INVOICES.map((invoice) => ({\n        ...invoice,\n        destination: {\n          href: `#${invoicePreviewId}`,\n          label: `Preview ${invoice.accessibleLabel} on this page`,\n          linkProps: {\n            onClick: () => {\n              setSelectedInvoiceId(invoice.id);\n              setMessage(`${invoice.label} opened in the local preview.`);\n            },\n          },\n        },\n      })),\n    [invoicePreviewId],\n  );\n\n  const selectedInvoice = INVOICES.find(\n    (invoice) => invoice.id === selectedInvoiceId,\n  );\n\n  return (\n    <section\n      className=\"billing-overview-demo\"\n      aria-label=\"Billing overview preview\"\n    >\n      <div className=\"billing-overview-demo-frame\">\n        <TidalBillingOverview\n          title=\"Studio plan\"\n          eyebrow={null}\n          description=\"Track allowances and review invoice history.\"\n          plan={{\n            name: \"Studio\",\n            accessibleName: \"Studio summary\",\n            status: \"Active plan\",\n            price: \"$24\",\n            priceNote: \"per month\",\n            description: \"A focused plan for a small product team.\",\n            details: planDetailsShown\n              ? [\n                  { id: \"period\", label: \"Period\", value: \"Monthly\" },\n                  { id: \"currency\", label: \"Currency\", value: \"USD\" },\n                  {\n                    id: \"renewal\",\n                    label: \"Renewal\",\n                    value: \"No renewal connected\",\n                  },\n                  {\n                    id: \"payment\",\n                    label: \"Payment\",\n                    value: \"No payment method\",\n                  },\n                ]\n              : [\n                  { id: \"period\", label: \"Period\", value: \"Monthly\" },\n                  { id: \"currency\", label: \"Currency\", value: \"USD\" },\n                ],\n            action: {\n              kind: \"link\",\n              id: \"plan-detail\",\n              label: planDetailsShown\n                ? \"Review plan details\"\n                : \"View plan details\",\n              href: `#${planDetailId}`,\n              linkProps: {\n                onClick: () => {\n                  setPlanDetailsShown(true);\n                  setMessage(\n                    \"Additional fictional plan details are visible locally.\",\n                  );\n                },\n              },\n            },\n          }}\n          allowances={PERIOD_ALLOWANCES[period]}\n          invoices={invoices}\n          invoiceCaption=\"Invoice history\"\n          periodControl={{\n            value: period,\n            options: [\n              { value: \"current\", label: \"Current period\" },\n              { value: \"previous\", label: \"Previous period\" },\n            ],\n            onValueChange: (value) => {\n              const nextPeriod = value === \"previous\" ? \"previous\" : \"current\";\n              setPeriod(nextPeriod);\n              setMessage(\n                nextPeriod === \"current\"\n                  ? \"Current fictional usage period selected.\"\n                  : \"Previous fictional usage period selected.\",\n              );\n            },\n          }}\n          footer={\n            <span>\n              <span role=\"status\" aria-live=\"polite\">\n                {message}\n              </span>{\" \"}\n              Sample billing data. No charge, purchase, or stored change occurs.\n            </span>\n          }\n        />\n\n        <div className=\"billing-overview-demo-details\">\n          <div id={planDetailId}>\n            {planDetailsShown ? (\n              <article tabIndex={-1}>\n                <span>Plan detail</span>\n                <h3>Studio</h3>\n                <p>The expanded terms are now visible in the plan summary.</p>\n              </article>\n            ) : null}\n          </div>\n          <div id={invoicePreviewId}>\n            {selectedInvoice ? (\n              <article tabIndex={-1}>\n                <span>Invoice preview</span>\n                <h3>{selectedInvoice.label}</h3>\n                <p>{selectedInvoice.note}</p>\n                <dl>\n                  <div>\n                    <dt>Date</dt>\n                    <dd>{selectedInvoice.date}</dd>\n                  </div>\n                  <div>\n                    <dt>Total</dt>\n                    <dd>{selectedInvoice.total}</dd>\n                  </div>\n                </dl>\n              </article>\n            ) : null}\n          </div>\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      <BillingOverviewDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/billing-overview.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [],
  "events": [],
  "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": []
}
