{
  "component": {
    "id": "team-members",
    "name": "Team members",
    "tier": "pro",
    "exampleId": "team-members",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/team-members-demo.tsx",
    "exportName": "TeamMembersDemo",
    "sha256": "87239889060039f6b650fd9fed5b9c6508076285db69fbf87f5ebdcd4cf899cb",
    "helperImports": [],
    "directComponentImports": [
      "team-members"
    ],
    "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/team-members",
    "registryUrl": "https://tidalui.com/r/pro/team-members.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/team-members",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/team-members",
      "registryUrl": "https://tidalui.com/r/pro/team-members.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/team-members.tsx",
    "exports": [
      "TidalTeamMember",
      "TidalTeamMemberStatus",
      "TidalTeamMembers",
      "TidalTeamRole"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/team-members.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "team-members"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/team-members.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/team-members.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/team-members-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useLayoutEffect, useMemo, useRef, useState } from \"react\";\n\nimport { Undo2 } from \"lucide-react\";\n\nimport { TidalTeamMembers, type TidalTeamMember, type TidalTeamMemberStatus, type TidalTeamRole } from \"./components/ui/team-members\";\n\nimport \"./components/ui/team-members.css\";\n\nfunction tidalExampleAvatarDataUri(seed: unknown) {\n  const text = String(seed).replace(/[^a-z0-9]/gi, \"\").slice(-2) || \"UI\";\n  const palette = [\"#333333\", \"#555555\", \"#777777\", \"#999999\", \"#bbbbbb\"];\n  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" rx=\"48\" fill=\"${color}\"/><circle cx=\"48\" cy=\"38\" r=\"17\" fill=\"white\" fill-opacity=\".92\"/><path d=\"M18 92c3-22 15-34 30-34s27 12 30 34\" fill=\"white\" fill-opacity=\".92\"/></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nfunction tidalExampleImageDataUri(label: string) {\n  const safeLabel = label.replace(/[<>&]/g, \"\").slice(0, 28) || \"Sample image\";\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1200 675\"><defs><linearGradient id=\"g\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\"><stop stop-color=\"#171717\"/><stop offset=\"1\" stop-color=\"#555555\"/></linearGradient></defs><rect width=\"1200\" height=\"675\" fill=\"url(#g)\"/><circle cx=\"950\" cy=\"100\" r=\"260\" fill=\"white\" fill-opacity=\".08\"/><text x=\"80\" y=\"570\" fill=\"white\" font-family=\"system-ui,sans-serif\" font-size=\"64\" font-weight=\"700\">${safeLabel}</text></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nconst tidalExampleStyles = \".tidal-scope .team-members-demo,\\n.tidal-scope .team-members-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .team-members-demo {\\n  width: 100%;\\n  min-width: 0;\\n  padding: clamp(11px, 3vw, 34px);\\n  color: var(--t-ink);\\n  background:\\n    linear-gradient(var(--t-border) 1px, transparent 1px),\\n    linear-gradient(90deg, var(--t-border) 1px, transparent 1px),\\n    var(--t-subtle);\\n  background-size: 25px 25px;\\n  border-radius: 22px;\\n  container: team-members-demo / inline-size;\\n}\\n\\n.tidal-scope .team-members-demo-shell {\\n  display: grid;\\n  width: 100%;\\n  max-width: 1180px;\\n  min-width: 0;\\n  gap: 12px;\\n  margin: 0 auto;\\n}\\n\\n.tidal-scope .team-members-demo-status-row {\\n  display: flex;\\n  min-width: 0;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 14px;\\n  padding: 4px 6px 0;\\n}\\n\\n.tidal-scope .team-members-demo-status-row 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 .team-members-demo-status-row button {\\n  display: inline-flex;\\n  min-width: 44px;\\n  min-height: 44px;\\n  flex: none;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 8px;\\n  padding: 8px 12px;\\n  color: var(--t-surface);\\n  background: var(--t-ink);\\n  border: 1px solid var(--t-ink);\\n  border-radius: var(--t-radius-control);\\n  font: inherit;\\n  font-size: 11px;\\n  font-weight: 650;\\n  cursor: pointer;\\n  transition: transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .team-members-demo-status-row button:active {\\n  transform: scale(0.98);\\n}\\n\\n.tidal-scope .team-members-demo-status-row button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n@container team-members-demo (max-width: 480px) {\\n  .tidal-scope .team-members-demo {\\n    padding: 7px;\\n    background-size: 18px 18px;\\n    border-radius: 18px;\\n  }\\n\\n  .tidal-scope .team-members-demo-status-row {\\n    align-items: stretch;\\n    flex-direction: column;\\n  }\\n\\n  .tidal-scope .team-members-demo-status-row button {\\n    width: 100%;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .team-members-demo-status-row button {\\n    transition: none;\\n    transform: none;\\n  }\\n}\";\n\ntype StatusFilter = \"all\" | TidalTeamMemberStatus;\n\ninterface SampleMember {\n  id: string;\n  name: string;\n  team: string;\n  roleId: string;\n  status: TidalTeamMemberStatus;\n  portrait: number;\n  detail: string;\n}\n\nconst ROLES: readonly TidalTeamRole[] = [\n  { id: \"manager\", label: \"Manager\" },\n  { id: \"editor\", label: \"Editor\" },\n  { id: \"viewer\", label: \"Viewer\" },\n];\n\nconst INITIAL_MEMBERS: readonly SampleMember[] = [\n  {\n    id: \"ava\",\n    name: \"Ava Chen\",\n    team: \"Product design\",\n    roleId: \"manager\",\n    status: \"available\",\n    portrait: 1,\n    detail: \"Design systems\",\n  },\n  {\n    id: \"noah\",\n    name: \"Noah Reed\",\n    team: \"Engineering\",\n    roleId: \"editor\",\n    status: \"available\",\n    portrait: 2,\n    detail: \"Web platform\",\n  },\n  {\n    id: \"mila\",\n    name: \"Mila Stone\",\n    team: \"Research\",\n    roleId: \"viewer\",\n    status: \"away\",\n    portrait: 3,\n    detail: \"Customer studies\",\n  },\n  {\n    id: \"eli\",\n    name: \"Eli Park\",\n    team: \"Operations\",\n    roleId: \"editor\",\n    status: \"offline\",\n    portrait: 4,\n    detail: \"Release planning\",\n  },\n  {\n    id: \"zoe\",\n    name: \"Zoe Brooks\",\n    team: \"Content\",\n    roleId: \"editor\",\n    status: \"available\",\n    portrait: 5,\n    detail: \"Product writing\",\n  },\n  {\n    id: \"leo\",\n    name: \"Leo Martin\",\n    team: \"Engineering\",\n    roleId: \"viewer\",\n    status: \"away\",\n    portrait: 6,\n    detail: \"Quality review\",\n  },\n  {\n    id: \"nora\",\n    name: \"Nora Ellis\",\n    team: \"Support\",\n    roleId: \"manager\",\n    status: \"available\",\n    portrait: 7,\n    detail: \"Team workflow\",\n  },\n  {\n    id: \"finn\",\n    name: \"Finn Walsh\",\n    team: \"Finance\",\n    roleId: \"viewer\",\n    status: \"offline\",\n    portrait: 8,\n    detail: \"Sample reporting\",\n  },\n  {\n    id: \"maya\",\n    name: \"Maya Ortiz\",\n    team: \"Marketing\",\n    roleId: \"editor\",\n    status: \"away\",\n    portrait: 9,\n    detail: \"Launch planning\",\n  },\n  {\n    id: \"owen\",\n    name: \"Owen Clark\",\n    team: \"Partnerships\",\n    roleId: \"viewer\",\n    status: \"available\",\n    portrait: 10,\n    detail: \"Sample programs\",\n  },\n];\n\nconst STATUS_LABELS: Record<TidalTeamMemberStatus, string> = {\n  available: \"Available\",\n  away: \"Away\",\n  offline: \"Offline\",\n};\n\nexport function TeamMembersDemo() {\n  const searchInputRef = useRef<HTMLInputElement>(null);\n  const undoButtonRef = useRef<HTMLButtonElement>(null);\n  const restoredRemoveRef = useRef<HTMLButtonElement>(null);\n  const pendingFocusRef = useRef<\"undo\" | { memberId: string } | null>(null);\n  const [members, setMembers] =\n    useState<readonly SampleMember[]>(INITIAL_MEMBERS);\n  const [query, setQuery] = useState(\"\");\n  const [statusFilter, setStatusFilter] = useState<StatusFilter>(\"all\");\n  const [removed, setRemoved] = useState<{\n    member: SampleMember;\n    index: number;\n  } | null>(null);\n  const [message, setMessage] = useState(\n    \"Showing ten fictional members. Every change stays in this local preview.\",\n  );\n\n  const counts = useMemo(\n    () => ({\n      all: members.length,\n      available: members.filter((member) => member.status === \"available\")\n        .length,\n      away: members.filter((member) => member.status === \"away\").length,\n      offline: members.filter((member) => member.status === \"offline\").length,\n    }),\n    [members],\n  );\n\n  const visibleMembers = useMemo(() => {\n    const normalizedQuery = query.trim().toLocaleLowerCase();\n    return members.filter((member) => {\n      const matchesStatus =\n        statusFilter === \"all\" || member.status === statusFilter;\n      const matchesQuery =\n        !normalizedQuery ||\n        `${member.name} ${member.team} ${member.detail}`\n          .toLocaleLowerCase()\n          .includes(normalizedQuery);\n      return matchesStatus && matchesQuery;\n    });\n  }, [members, query, statusFilter]);\n\n  const componentMembers = useMemo<readonly TidalTeamMember[]>(\n    () =>\n      visibleMembers.map((member) => ({\n        id: member.id,\n        name: member.name,\n        accessibleName: member.name,\n        subtitle: member.team,\n        avatar: {\n          src: tidalExampleAvatarDataUri(String(member.portrait).padStart(2, \"0\")),\n          alt: \"\",\n        },\n        roleId: member.roleId,\n        status: {\n          state: member.status,\n          label: STATUS_LABELS[member.status],\n        },\n        meta: member.detail,\n        removeButtonProps: {\n          \"aria-label\": `Remove ${member.name} from the local sample`,\n        },\n        removeButtonRef:\n          typeof pendingFocusRef.current === \"object\" &&\n          pendingFocusRef.current?.memberId === member.id\n            ? restoredRemoveRef\n            : undefined,\n      })),\n    [visibleMembers],\n  );\n\n  useLayoutEffect(() => {\n    const pendingFocus = pendingFocusRef.current;\n    if (!pendingFocus) return;\n\n    if (pendingFocus === \"undo\") {\n      undoButtonRef.current?.focus({ preventScroll: true });\n    } else {\n      (restoredRemoveRef.current ?? searchInputRef.current)?.focus({\n        preventScroll: true,\n      });\n    }\n\n    pendingFocusRef.current = null;\n    restoredRemoveRef.current = null;\n  });\n\n  function changeRole(memberId: string, roleId: string) {\n    const member = members.find((entry) => entry.id === memberId);\n    const role = ROLES.find((entry) => entry.id === roleId);\n    if (!member || !role) return;\n    setMembers((current) =>\n      current.map((entry) =>\n        entry.id === memberId ? { ...entry, roleId } : entry,\n      ),\n    );\n    setMessage(\n      `${member.name} is now ${role.label} in this local sample. No account changed.`,\n    );\n  }\n\n  function removeMember(memberId: string) {\n    const index = members.findIndex((member) => member.id === memberId);\n    if (index < 0) return;\n    const member = members[index];\n    pendingFocusRef.current = \"undo\";\n    setMembers((current) => current.filter((entry) => entry.id !== memberId));\n    setRemoved({ member, index });\n    setMessage(\n      `${member.name} was removed from this rendered sample only. Undo is available.`,\n    );\n  }\n\n  function undoRemoval() {\n    if (!removed) return;\n    restoredRemoveRef.current = null;\n    pendingFocusRef.current = { memberId: removed.member.id };\n    setMembers((current) => {\n      const next = [...current];\n      next.splice(Math.min(removed.index, next.length), 0, removed.member);\n      return next;\n    });\n    setMessage(`${removed.member.name} was restored to the local sample.`);\n    setRemoved(null);\n  }\n\n  const filterOptions = ([\"all\", \"available\", \"away\", \"offline\"] as const).map(\n    (id) => ({\n      id,\n      label: id === \"all\" ? \"All\" : STATUS_LABELS[id],\n      count: counts[id],\n    }),\n  );\n\n  return (\n    <section className=\"team-members-demo\" aria-label=\"Team members preview\">\n      <div className=\"team-members-demo-shell\">\n        <TidalTeamMembers\n          title=\"Team members\"\n          eyebrow={null}\n          description=\"Search the sample team or change a role.\"\n          members={componentMembers}\n          roles={ROLES}\n          search={{\n            value: query,\n            label: \"Search members\",\n            placeholder: \"Search name or team\",\n            inputRef: searchInputRef,\n            inputProps: { autoComplete: \"off\", name: \"member-search\" },\n            onValueChange: (value) => {\n              setQuery(value);\n              setMessage(\n                value.trim()\n                  ? `Showing local matches for “${value.trim()}”.`\n                  : \"Search cleared. Showing members in the selected status.\",\n              );\n            },\n          }}\n          filter={{\n            value: statusFilter,\n            label: \"Filter members by sample availability\",\n            options: filterOptions,\n            onValueChange: (value) => {\n              const next = value as StatusFilter;\n              setStatusFilter(next);\n              setMessage(\n                next === \"all\"\n                  ? \"Showing every fictional member.\"\n                  : `Showing fictional members marked ${STATUS_LABELS[next].toLowerCase()}.`,\n              );\n            },\n          }}\n          onRoleChange={(member, roleId) => changeRole(member.id, roleId)}\n          onRemoveMember={(member) => removeMember(member.id)}\n          removeLabel={() => \"Remove\"}\n          emptyMessage=\"No fictional members match this local view.\"\n          footer={\n            <span>Fictional sample data. Changes stay in this preview.</span>\n          }\n        />\n\n        <div className=\"team-members-demo-status-row\">\n          <p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n            {message}\n          </p>\n          {removed ? (\n            <button ref={undoButtonRef} type=\"button\" onClick={undoRemoval}>\n              <Undo2 aria-hidden=\"true\" size={15} />\n              Undo removal\n            </button>\n          ) : null}\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      <TeamMembersDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/team-members.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": "onRemoveMember",
      "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": "onRoleChange",
      "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": "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": []
}
