{
  "component": {
    "id": "announcement-banner",
    "name": "Announcement banner",
    "tier": "pro",
    "exampleId": "announcement-banner",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/announcement-banner-demo.tsx",
    "exportName": "AnnouncementBannerDemo",
    "sha256": "e74bcc0674901ce8a2b39e4e5f3656f79d19f7a674d21649b9b41b8ac68c04e2",
    "helperImports": [],
    "directComponentImports": [
      "announcement-banner"
    ],
    "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/announcement-banner",
    "registryUrl": "https://tidalui.com/r/pro/announcement-banner.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/announcement-banner",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/announcement-banner",
      "registryUrl": "https://tidalui.com/r/pro/announcement-banner.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/announcement-banner.tsx",
    "exports": [
      "TidalAnnouncementAction",
      "TidalAnnouncementBanner"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/announcement-banner.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "announcement-banner"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/announcement-banner.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/announcement-banner.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/announcement-banner-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 { TidalAnnouncementBanner, type TidalAnnouncementAction } from \"./components/ui/announcement-banner\";\n\nimport \"./components/ui/announcement-banner.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .announcement-demo,\\n.tidal-scope .announcement-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .announcement-demo {\\n  container: announcement-demo / inline-size;\\n  display: grid;\\n  width: min(100%, 980px);\\n  min-width: 0;\\n  gap: 14px;\\n  margin-inline: auto;\\n  padding: clamp(10px, 3vw, 28px);\\n  color: var(--t-ink);\\n}\\n\\n.tidal-scope .announcement-demo-header,\\n.tidal-scope .announcement-demo-header > div,\\n.tidal-scope .announcement-demo-restored,\\n.tidal-scope .announcement-demo-restored > div,\\n.tidal-scope .announcement-demo-details header,\\n.tidal-scope .announcement-demo-footer {\\n  min-width: 0;\\n}\\n\\n.tidal-scope .announcement-demo-header {\\n  display: flex;\\n  min-height: 52px;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 14px;\\n  padding-bottom: 10px;\\n  border-bottom: 1px solid var(--t-border);\\n}\\n\\n.tidal-scope .announcement-demo-header > div {\\n  display: flex;\\n  align-items: center;\\n  gap: 10px;\\n}\\n\\n.tidal-scope .announcement-demo-header > div > span {\\n  display: grid;\\n  width: 40px;\\n  height: 40px;\\n  flex: 0 0 auto;\\n  place-items: center;\\n  border-radius: 10px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  font-size: 15px;\\n  font-weight: 780;\\n}\\n\\n.tidal-scope .announcement-demo-header > div > div {\\n  display: grid;\\n  min-width: 0;\\n  gap: 2px;\\n}\\n\\n.tidal-scope .announcement-demo :is(h2, p, strong, span) {\\n  min-width: 0;\\n  margin: 0;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .announcement-demo-header p,\\n.tidal-scope .announcement-demo-header > span,\\n.tidal-scope .announcement-demo-footer,\\n.tidal-scope .announcement-demo-restored span,\\n.tidal-scope .announcement-demo-details header span {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.45;\\n}\\n\\n.tidal-scope .announcement-demo-header h2 {\\n  font-size: 18px;\\n  font-weight: 640;\\n  letter-spacing: -0.035em;\\n}\\n\\n.tidal-scope .announcement-demo-stage {\\n  display: grid;\\n  min-width: 0;\\n  gap: 10px;\\n}\\n\\n.tidal-scope .announcement-demo-restored {\\n  display: flex;\\n  min-height: 82px;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 14px;\\n  padding: 14px;\\n  border: 1px dashed var(--t-border-strong);\\n  border-radius: 18px;\\n  background: var(--t-subtle);\\n}\\n\\n.tidal-scope .announcement-demo-restored > div {\\n  display: grid;\\n  gap: 4px;\\n}\\n\\n.tidal-scope .announcement-demo-restored strong {\\n  font-size: 13px;\\n}\\n\\n.tidal-scope .announcement-demo-restored button {\\n  min-width: 88px;\\n  min-height: 44px;\\n  padding: 8px 14px;\\n  border: 1px solid var(--t-ink);\\n  border-radius: 10px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  font: inherit;\\n  font-size: 11px;\\n  font-weight: 700;\\n  cursor: pointer;\\n  transition: transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .announcement-demo-restored button:active {\\n  transform: scale(0.97);\\n}\\n\\n.tidal-scope .announcement-demo-restored button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .announcement-demo-details {\\n  display: grid;\\n  min-width: 0;\\n  max-height: 0;\\n  gap: 12px;\\n  padding-inline: 16px;\\n  overflow: hidden;\\n  border: 1px solid transparent;\\n  border-radius: 16px;\\n  opacity: 0;\\n  background: var(--t-subtle);\\n  transform: translateY(-5px);\\n  transition:\\n    max-height 420ms var(--t-ease-out),\\n    padding 320ms var(--t-ease-out),\\n    border-color 240ms,\\n    opacity 240ms,\\n    transform 320ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .announcement-demo-details[data-open] {\\n  max-height: 260px;\\n  padding-block: 16px;\\n  border-color: var(--t-border);\\n  opacity: 1;\\n  transform: none;\\n}\\n\\n.tidal-scope .announcement-demo-details header {\\n  display: flex;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 12px;\\n}\\n\\n.tidal-scope .announcement-demo-details header strong {\\n  font-size: 13px;\\n}\\n\\n.tidal-scope .announcement-demo-details ol {\\n  display: grid;\\n  min-width: 0;\\n  grid-template-columns: repeat(2, minmax(0, 1fr));\\n  gap: 8px;\\n  margin: 0;\\n  padding: 0;\\n  list-style: none;\\n}\\n\\n.tidal-scope .announcement-demo-details li {\\n  display: grid;\\n  min-width: 0;\\n  grid-template-columns: 30px minmax(0, 1fr);\\n  align-items: start;\\n  gap: 9px;\\n  padding: 10px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 10px;\\n  background: var(--t-surface);\\n}\\n\\n.tidal-scope .announcement-demo-details li span {\\n  display: grid;\\n  width: 30px;\\n  height: 30px;\\n  place-items: center;\\n  border-radius: 8px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  font-size: 11px;\\n  font-weight: 740;\\n}\\n\\n.tidal-scope .announcement-demo-details li p {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n}\\n\\n.tidal-scope .announcement-demo-footer {\\n  display: flex;\\n  justify-content: space-between;\\n  gap: 12px;\\n}\\n\\n@container announcement-demo (max-width: 520px) {\\n  .tidal-scope .announcement-demo-header > span {\\n    display: none;\\n  }\\n\\n  .tidal-scope .announcement-demo-details ol {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n\\n  .tidal-scope .announcement-demo-restored,\\n  .tidal-scope .announcement-demo-footer {\\n    align-items: stretch;\\n    flex-direction: column;\\n  }\\n\\n  .tidal-scope .announcement-demo-restored button {\\n    width: 100%;\\n    font-size: 16px;\\n  }\\n}\\n\\n@media (pointer: coarse) {\\n  .tidal-scope .announcement-demo-restored button {\\n    font-size: 16px;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .announcement-demo-restored button,\\n  .tidal-scope .announcement-demo-details {\\n    transition: none;\\n  }\\n\\n  .tidal-scope .announcement-demo-restored button:active,\\n  .tidal-scope .announcement-demo-details {\\n    transform: none;\\n  }\\n}\";\n\nexport function AnnouncementBannerDemo() {\n  const instanceId = useId().replace(/:/g, \"\");\n  const headingId = `${instanceId}-workspace-heading`;\n  const detailsId = `${instanceId}-release-details`;\n  const [visible, setVisible] = useState(true);\n  const [detailsOpen, setDetailsOpen] = useState(false);\n  const [status, setStatus] = useState(\"The release note is ready to review.\");\n  const [focusIntent, setFocusIntent] = useState<\"dismiss\" | \"restore\" | null>(\n    null,\n  );\n  const dismissRef = useRef<HTMLButtonElement>(null);\n  const restoreRef = useRef<HTMLButtonElement>(null);\n\n  useLayoutEffect(() => {\n    if (focusIntent === \"dismiss\" && visible)\n      dismissRef.current?.focus({ preventScroll: true });\n    if (focusIntent === \"restore\" && !visible)\n      restoreRef.current?.focus({ preventScroll: true });\n    setFocusIntent(null);\n  }, [focusIntent, visible]);\n\n  const actions: readonly TidalAnnouncementAction[] = [\n    {\n      id: \"changes\",\n      kind: \"button\",\n      label: detailsOpen ? \"Hide changes\" : \"View changes\",\n      emphasis: \"primary\",\n      buttonProps: {\n        \"aria-expanded\": detailsOpen,\n        \"aria-controls\": detailsId,\n        onClick: () => {\n          setDetailsOpen((current) => !current);\n          setStatus(\n            detailsOpen\n              ? \"Release details are hidden.\"\n              : \"Release details are visible below.\",\n          );\n        },\n      },\n    },\n    {\n      id: \"guide\",\n      kind: \"link\",\n      href: `#${detailsId}`,\n      label: \"Open setup note\",\n      anchorProps: {\n        onClick: () => {\n          setDetailsOpen(true);\n          setStatus(\"The local setup note is open.\");\n        },\n      },\n    },\n  ];\n\n  return (\n    <section className=\"announcement-demo\" aria-labelledby={headingId}>\n      <header className=\"announcement-demo-header\">\n        <div>\n          <span aria-hidden=\"true\">T</span>\n          <div>\n            <p>Sample workspace</p>\n            <h2 id={headingId}>Release notes</h2>\n          </div>\n        </div>\n        <span>October update</span>\n      </header>\n\n      <div className=\"announcement-demo-stage\">\n        {visible ? (\n          <TidalAnnouncementBanner\n            label=\"Workspace release announcement\"\n            title=\"Review queue update\"\n            description=\"Group feedback by project and archive completed notes.\"\n            badge=\"New in this sample\"\n            actions={actions}\n            onDismiss={() => {\n              setVisible(false);\n              setStatus(\"The release announcement was dismissed locally.\");\n              setFocusIntent(\"restore\");\n            }}\n            dismissButtonRef={dismissRef}\n          />\n        ) : (\n          <div className=\"announcement-demo-restored\">\n            <div>\n              <strong>Announcement hidden</strong>\n              <span>The sample workspace remains unchanged.</span>\n            </div>\n            <button\n              ref={restoreRef}\n              type=\"button\"\n              onClick={() => {\n                setVisible(true);\n                setStatus(\"The release announcement is visible again.\");\n                setFocusIntent(\"dismiss\");\n              }}\n            >\n              Restore\n            </button>\n          </div>\n        )}\n\n        <article\n          id={detailsId}\n          className=\"announcement-demo-details\"\n          data-open={detailsOpen || undefined}\n          aria-hidden={!detailsOpen}\n          inert={!detailsOpen ? true : undefined}\n        >\n          <header>\n            <span>Local setup note</span>\n            <strong>Review queue</strong>\n          </header>\n          <ol>\n            <li>\n              <span>01</span>\n              <p>Open a project and choose Review.</p>\n            </li>\n            <li>\n              <span>02</span>\n              <p>Resolve or archive each sample note.</p>\n            </li>\n          </ol>\n        </article>\n      </div>\n\n      <footer className=\"announcement-demo-footer\">\n        <p role=\"status\" aria-live=\"polite\">\n          {status}\n        </p>\n        <span>Sample data. Changes stay in this preview.</span>\n      </footer>\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      <AnnouncementBannerDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/announcement-banner.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."
    },
    {
      "name": "onDismiss",
      "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": false,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "No form submit is present in the existing demo.",
    "resetBehavior": "No reset control is present in the existing demo.",
    "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": "No error fixture is exposed by the existing demo; inject a consumer-owned failure state before production use.",
      "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": []
}
