{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "team-list",
  "type": "registry:block",
  "title": "Team, list",
  "description": "People as rows: portrait, name and role, a longer bio and one link. Reads like a directory, good for eight people or fewer with something to say. Leave the link label empty to drop the link.",
  "categories": [
    "team"
  ],
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-c-proof.json",
    "https://ui.klarhimmel.com/r/text-link.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/team-list/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/team-list/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, t } from '../_shared/schema';\n\n// KB-178: bio raised 240 -> 900; real bios run 390-800 chars (longest about 800, salong-you). Blank lines draw as paragraph gaps.\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  members: z.array(z.object({ name: t(60), role: t(60), location: t(40), bio: t(900), photo: media, link })).min(1).max(8),\n});\n\nexport const spec = defineSpec({\n  type: 'team-list',\n  aliases: ['team/list'],\n  name: 'Team, list',\n  category: 'team',\n  role: 'body',\n  description: 'People as rows: portrait, name and role, a longer bio and one link. Reads like a directory, good for eight people or fewer with something to say. Leave the link label empty to drop the link.',\n  schema,\n  defaults: {\n    eyebrow: 'Name a topic',\n    title: 'Say who they will talk to',\n    description: 'Say in one or two sentences how many people there are and how they help customers.',\n    members: [\n      { name: 'Name a person', role: 'Their role and focus', location: 'Name a place', bio: 'Say what they do day to day and what they care about. Add what in their past still shapes how they work with customers.', photo: { src: '', alt: 'A portrait of the person' }, link: { label: 'Main action', href: 'mailto:elin@example.com' } },\n      { name: 'Name a person', role: 'Their role and focus', location: 'Name a place', bio: 'Say what they do and what they care about. Add one habit that shows how they work.', photo: { src: '', alt: 'A portrait of the person' }, link: { label: 'Main action', href: '#' } },\n      { name: 'Name a person', role: 'Their role', location: 'Name a place', bio: 'Say what they do and what they care about, in one or two sentences.', photo: { src: '', alt: 'A portrait of the person' }, link: { label: 'Main action', href: '#' } },\n      { name: 'Name a person', role: 'Their role', location: 'Name a place', bio: 'Say what they do and what they care about, in one or two sentences.', photo: { src: '', alt: 'A portrait of the person' }, link: { label: 'Main action', href: 'mailto:leo@example.com' } },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/team-list/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/team-list/index.tsx",
      "content": "import { Media, Text, withHeadingLevel } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { linkClass } from '../../ui/text-link';\nimport { Container, Opt, Section, useEditing, usePictureSlots } from '../_shared/kit';\nimport { Heading, useHeadingId } from '../_shared/c-proof-kit';\nimport { cn } from '../../lib/utils';\nimport { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\n\nexport { spec };\ntype Props = z.infer<typeof spec.schema>;\n\nfunction TeamList({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const editing = useEditing();\n  const slots = usePictureSlots();\n  // Photos draw only when every person has one; without them the photo column goes and the row starts with the name.\n  const photos = slots || props.members.every((m) => m.photo.src);\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n        <ul className=\"mt-14 divide-y divide-kh-line border-y border-kh-line\">\n          {props.members.map((m, i) => (\n            <li key={i} className={cn('grid gap-x-8 gap-y-5 py-8 @4xl:items-start', photos ? '@2xl:grid-cols-[7rem_1fr] @4xl:grid-cols-[7rem_15rem_1fr_9rem]' : '@2xl:grid-cols-[15rem_1fr] @4xl:grid-cols-[15rem_1fr_9rem]')}>\n              {photos && <Media path={['members', i, 'photo']} value={m.photo} ratio=\"1 / 1\" className=\"w-24 rounded-kh-lg border border-kh-line @2xl:w-28\" />}\n              <div>\n                <Text path={['members', i, 'name']} value={m.name} as=\"h3\" className=\"text-kh-heading font-semibold\" />\n                <Text path={['members', i, 'role']} value={m.role} as=\"p\" className=\"text-kh-small text-kh-accent-ink\" />\n                <Opt path={['members', i, 'location']} value={m.location} className=\"mt-1 text-kh-caption text-kh-muted\" placeholder=\"Location\" />\n              </div>\n              <Text path={['members', i, 'bio']} value={m.bio} as=\"p\" multiline className={cn('max-w-kh-lead whitespace-pre-line text-kh-body text-kh-muted', photos && '@2xl:col-start-2 @4xl:col-start-auto')} />\n              {(m.link.label || editing) && (\n                <a href={safeHref(m.link.href)} className={cn(linkClass(), 'inline-flex min-h-11 items-center self-start text-kh-small font-medium @2xl:col-start-2 @4xl:col-start-auto @4xl:justify-self-end')}>\n                  <Text path={['members', i, 'link', 'label']} value={m.link.label} as=\"span\" placeholder=\"Label\" />\n                </a>\n              )}\n            </li>\n          ))}\n        </ul>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(TeamList);\n"
    }
  ]
}
