{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "team-sections-02",
  "title": "Team list",
  "description": "The team as rows grouped by team, each with its drawn picture, role and city and a bio behind a toggle: the open row lifts onto a card while its bio and social links unfold under it and its chevron turns.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/avatar.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/chat-motion.json",
    "https://ui.ndekocode.dev/r/demonstration.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/use-autoplay.json",
    "https://ui.ndekocode.dev/r/use-kept-height.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/blocks/team-sections/team-sections-02/index.tsx",
      "content": "'use client';\n\nimport { useId, useState } from 'react';\n\nimport { useAutoplay } from '@/registry/ndeko/hooks/use-autoplay';\nimport { useKeptHeight } from '@/registry/ndeko/hooks/use-kept-height';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { PRESS_LEAD_MS, usePress } from '@/registry/ndeko/lib/demonstration';\nimport { UsersIcon } from '@/registry/ndeko/lib/icons';\n\nimport { GROUPS, SECTION, type Group } from './data';\nimport { MemberRow } from './member-row';\n\nconst FIRST_SHOWN_ID = 'ben';\n\nconst SECOND_SHOWN_ID = 'rosa';\n\nconst RESTING_OPEN = [FIRST_SHOWN_ID];\n\nconst NONE_OPEN: string[] = [];\n\nconst READ_MS = 3600;\n\n/** `null` until someone opens a row: all closed while the demonstration plays, one open under reduced motion. */\ntype OpenIds = string[] | null;\n\nfunction openIdsOf(state: OpenIds, shouldReduceMotion: boolean) {\n  if (state !== null) {\n    return state;\n  }\n  if (shouldReduceMotion) {\n    return RESTING_OPEN;\n  }\n  return NONE_OPEN;\n}\n\nfunction withToggled(ids: readonly string[], id: string, isOpen: boolean) {\n  const others = ids.filter((candidate) => candidate !== id);\n  if (isOpen) {\n    return [...others, id];\n  }\n  return others;\n}\n\nfunction peopleWordOf(count: number) {\n  if (count === 1) {\n    return '1 person';\n  }\n  return `${count} people`;\n}\n\ntype TeamGroupProps = {\n  group: Group;\n  openIds: readonly string[];\n  pressed: string | null;\n  onToggle: (memberId: string) => void;\n};\n\nfunction TeamGroup({ group, openIds, pressed, onToggle }: TeamGroupProps) {\n  const headingId = useId();\n  const count = group.members.length;\n\n  return (\n    <section aria-labelledby={headingId} className='flex flex-col gap-2'>\n      <h3\n        id={headingId}\n        className='flex items-baseline gap-2 px-3 text-[13px] font-medium'\n      >\n        {group.name}\n        <span className='text-muted-foreground text-xs font-normal tabular-nums'>\n          {peopleWordOf(count)}\n        </span>\n      </h3>\n      <ul className='flex flex-col gap-1'>\n        {group.members.map((member) => (\n          <MemberRow\n            key={member.id}\n            member={member}\n            isOpen={openIds.includes(member.id)}\n            isPressed={pressed === member.id}\n            onToggle={onToggle}\n          />\n        ))}\n      </ul>\n    </section>\n  );\n}\n\nexport default function TeamSections02() {\n  const [state, setState] = useState<OpenIds>(null);\n  const { pressed, press } = usePress<string>();\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const openIds = openIdsOf(state, shouldReduceMotion);\n\n  function setOpen(id: string, isOpen: boolean) {\n    const next = withToggled(openIds, id, isOpen);\n    setState(next);\n  }\n\n  function toggle(id: string) {\n    const isOpen = openIds.includes(id);\n    setOpen(id, !isOpen);\n  }\n\n  const steps = [\n    { after: 2200, run: () => press(FIRST_SHOWN_ID) },\n    { after: PRESS_LEAD_MS, run: () => setOpen(FIRST_SHOWN_ID, true) },\n    { after: READ_MS, run: () => press(FIRST_SHOWN_ID) },\n    { after: PRESS_LEAD_MS, run: () => setOpen(FIRST_SHOWN_ID, false) },\n    { after: 1200, run: () => press(SECOND_SHOWN_ID) },\n    { after: PRESS_LEAD_MS, run: () => setOpen(SECOND_SHOWN_ID, true) },\n    { after: READ_MS, run: () => press(SECOND_SHOWN_ID) },\n    { after: PRESS_LEAD_MS, run: () => setOpen(SECOND_SHOWN_ID, false) },\n  ];\n  const { ref } = useAutoplay<HTMLElement>(steps, {\n    loopAfter: 2400,\n    onReset: () => setState(null),\n  });\n  useKeptHeight(ref);\n\n  return (\n    <section ref={ref} className='@container min-h-[56rem]'>\n      <div className='mx-auto grid max-w-6xl gap-10 px-4 py-16 @2xl:px-6 @2xl:py-24 @4xl:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] @4xl:gap-16 @5xl:px-8'>\n        <header className='flex max-w-xl flex-col gap-3 self-start'>\n          <p className='text-primary-ink flex items-center gap-1.5 text-[13px] font-medium'>\n            <UsersIcon className='size-4' />\n            {SECTION.label}\n          </p>\n          <h2 className='text-2xl font-semibold text-balance @2xl:text-3xl'>\n            {SECTION.title}\n          </h2>\n          <p className='text-muted-foreground text-base text-pretty'>\n            {SECTION.lead}\n          </p>\n        </header>\n        <div className='flex flex-col gap-8'>\n          {GROUPS.map((group) => (\n            <TeamGroup\n              key={group.id}\n              group={group}\n              openIds={openIds}\n              pressed={pressed}\n              onToggle={toggle}\n            />\n          ))}\n        </div>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/team-sections-02/index.tsx"
    },
    {
      "path": "registry/ndeko/blocks/team-sections/team-sections-02/member-row.tsx",
      "content": "'use client';\n\nimport { useId } from 'react';\n\nimport { pressedQuietOf } from '@/registry/ndeko/lib/demonstration';\nimport {\n  ChevronDownIcon,\n  GithubIcon,\n  LinkedinBrandIcon,\n  MapPinIcon,\n  TwitterXIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Fold } from '@/registry/ndeko/ui/chat-motion';\n\nimport type { Member, SocialKind } from './data';\n\nconst SOCIAL_ICONS: Record<SocialKind, Icon> = {\n  linkedin: LinkedinBrandIcon,\n  x: TwitterXIcon,\n  github: GithubIcon,\n};\n\nconst SOCIAL_NAMES: Record<SocialKind, string> = {\n  linkedin: 'LinkedIn',\n  x: 'X',\n  github: 'GitHub',\n};\n\nfunction surfaceOf(isOpen: boolean) {\n  if (isOpen) {\n    return 'bg-card ring-border shadow-[0_1px_2px_rgb(0_0_0/0.04)] dark:bg-foreground/[0.04]';\n  }\n  return 'ring-transparent';\n}\n\nfunction chevronTurnOf(isOpen: boolean) {\n  if (isOpen) {\n    return 'rotate-180';\n  }\n  return 'rotate-0';\n}\n\ntype MemberRowProps = {\n  member: Member;\n  isOpen: boolean;\n  isPressed: boolean;\n  onToggle: (memberId: string) => void;\n};\n\nexport function MemberRow({\n  member,\n  isOpen,\n  isPressed,\n  onToggle,\n}: MemberRowProps) {\n  const bioId = useId();\n\n  return (\n    <li\n      className={cn(\n        'hairline-ring rounded-xl transition-[background-color,box-shadow] duration-200 ease-(--ease-out-strong)',\n        surfaceOf(isOpen)\n      )}\n    >\n      <button\n        type='button'\n        aria-expanded={isOpen}\n        aria-controls={bioId}\n        onClick={() => onToggle(member.id)}\n        className={cn(\n          'hover:bg-foreground/[0.03] focus-visible:ring-ring/25 flex w-full cursor-pointer items-center gap-3 rounded-xl px-3 py-2.5 text-start transition-[background-color,scale] duration-150 ease-(--ease-out-strong) outline-none focus-visible:ring-[3px]',\n          pressedQuietOf(isPressed)\n        )}\n      >\n        <Avatar seed={member.name} className='size-9' />\n        <span className='flex min-w-0 flex-1 flex-col'>\n          <span className='truncate text-sm font-medium'>{member.name}</span>\n          <span className='text-muted-foreground truncate text-[13px]'>\n            {member.role}\n          </span>\n        </span>\n        <span className='text-muted-foreground hidden shrink-0 items-center gap-1 text-xs @xl:flex'>\n          <MapPinIcon className='size-3.5' />\n          {member.location}\n        </span>\n        <ChevronDownIcon\n          className={cn(\n            'text-muted-foreground size-4 shrink-0 transition-[rotate] duration-200 ease-(--ease-out-strong)',\n            chevronTurnOf(isOpen)\n          )}\n        />\n      </button>\n      <Fold open={isOpen} id={bioId}>\n        <div className='flex flex-col items-start gap-3 ps-[3.75rem] pe-4 pt-0.5 pb-4'>\n          <p className='text-muted-foreground text-[13px] leading-5 text-pretty'>\n            {member.bio}\n          </p>\n          <p className='text-muted-foreground flex items-center gap-1 text-xs @xl:hidden'>\n            <MapPinIcon className='size-3.5' />\n            {member.location}\n          </p>\n          <ul className='-mx-1.5 flex items-center gap-0.5'>\n            {member.socials.map((social) => {\n              const Glyph = SOCIAL_ICONS[social.kind];\n              const label = `${member.name} on ${SOCIAL_NAMES[social.kind]}`;\n\n              return (\n                <li key={social.kind}>\n                  <Button\n                    variant='ghost'\n                    size='icon-sm'\n                    nativeButton={false}\n                    aria-label={label}\n                    render={<a href={social.href} />}\n                    className='text-muted-foreground'\n                  >\n                    <Glyph />\n                  </Button>\n                </li>\n              );\n            })}\n          </ul>\n        </div>\n      </Fold>\n    </li>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/team-sections-02/member-row.tsx"
    },
    {
      "path": "registry/ndeko/blocks/team-sections/team-sections-02/data.ts",
      "content": "export type SocialKind = 'linkedin' | 'x' | 'github';\n\nexport type Social = {\n  kind: SocialKind;\n  href: string;\n};\n\nexport type Member = {\n  id: string;\n  name: string;\n  role: string;\n  location: string;\n  bio: string;\n  socials: Social[];\n};\n\nexport type Group = {\n  id: string;\n  name: string;\n  members: Member[];\n};\n\nexport const SECTION = {\n  label: 'Team',\n  title: 'Who builds Fieldnote',\n  lead: 'Seven people across three teams. Open a name to read what they work on and how to reach them.',\n};\n\n/** Invented people. */\nexport const GROUPS: Group[] = [\n  {\n    id: 'product',\n    name: 'Product',\n    members: [\n      {\n        id: 'hanna',\n        name: 'Hanna Virtanen',\n        role: 'Co-founder, product',\n        location: 'Helsinki',\n        bio: 'Hanna ran research interviews for six years and lost count of the notes she never read again. She decides what Fieldnote writes down and, just as often, what it leaves out.',\n        socials: [\n          { kind: 'linkedin', href: '#' },\n          { kind: 'x', href: '#' },\n        ],\n      },\n      {\n        id: 'diego',\n        name: 'Diego Álvarez',\n        role: 'Product designer',\n        location: 'Valencia',\n        bio: 'Diego designs the summary page people open after every call. He reads a hundred real summaries a week, with permission, and redraws the page whenever people skip the same part of it.',\n        socials: [{ kind: 'linkedin', href: '#' }],\n      },\n    ],\n  },\n  {\n    id: 'engineering',\n    name: 'Engineering',\n    members: [\n      {\n        id: 'ayesha',\n        name: 'Ayesha Siddiqui',\n        role: 'Co-founder, engineering',\n        location: 'Toronto',\n        bio: 'Ayesha built the pipeline that turns a call into a transcript and a transcript into decisions. She is the reason a recording is deleted the moment its summary is approved.',\n        socials: [\n          { kind: 'github', href: '#' },\n          { kind: 'linkedin', href: '#' },\n        ],\n      },\n      {\n        id: 'ben',\n        name: 'Ben Kalala',\n        role: 'Speech recognition engineer',\n        location: 'Kinshasa',\n        bio: 'Ben tunes how Fieldnote hears accents, crosstalk and bad microphones, in French and Lingala as much as in English. He keeps a library of the hardest calls customers agreed to share and replays all of them before every release.',\n        socials: [\n          { kind: 'github', href: '#' },\n          { kind: 'x', href: '#' },\n        ],\n      },\n      {\n        id: 'yuki',\n        name: 'Yuki Sato',\n        role: 'Frontend engineer',\n        location: 'Osaka',\n        bio: 'Yuki builds the editor where people fix a summary before it is shared. Every shortcut in it exists because someone asked for it twice in support.',\n        socials: [{ kind: 'github', href: '#' }],\n      },\n    ],\n  },\n  {\n    id: 'customers',\n    name: 'Customers',\n    members: [\n      {\n        id: 'rosa',\n        name: 'Rosa Delgado',\n        role: 'Customer support lead',\n        location: 'Buenos Aires',\n        bio: 'Rosa answers support in Spanish, Portuguese and English, and writes down every question that took more than one reply. Those questions become the next week’s fixes.',\n        socials: [{ kind: 'linkedin', href: '#' }],\n      },\n      {\n        id: 'liam',\n        name: 'Liam O’Connor',\n        role: 'Solutions engineer',\n        location: 'Dublin',\n        bio: 'Liam helps larger teams connect Fieldnote to their calendars and their wikis. He has sat in on more onboarding calls than anyone here and still takes his own notes by hand.',\n        socials: [\n          { kind: 'linkedin', href: '#' },\n          { kind: 'x', href: '#' },\n        ],\n      },\n    ],\n  },\n];\n",
      "type": "registry:component",
      "target": "components/blocks/team-sections-02/data.ts"
    }
  ],
  "categories": [
    "blocks",
    "team-sections"
  ],
  "type": "registry:block"
}