{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "contact-bands",
  "type": "registry:block",
  "title": "Contact, bands",
  "description": "Three full-width bands one after another: a header (label, heading and lead), a tinted band with a picture and caption beside a card of badge, place, address, contact links and three actions, then a band with a short heading beside opening hours as ruled rows and a small note. On a phone each band stacks into one column.",
  "categories": [
    "contact"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "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"
  ],
  "files": [
    {
      "path": "src/blocks/contact-bands/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/contact-bands/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, req, t } from '../_shared/schema';\n\nconst hour = z.object({\n  label: req(40),\n  time: t(40),\n});\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: req(120),\n  description: t(240),\n  media,\n  caption: t(100),\n  badge: t(24),\n  placeTitle: req(80),\n  address: t(100),\n  phone: link,\n  email: link,\n  primary: link,\n  secondary: link,\n  tertiary: link,\n  hoursTitle: t(80),\n  hoursDescription: t(200),\n  /** A list is an array field, never a slot. */\n  hours: z.array(hour).min(1).max(7),\n  note: t(160),\n});\n\nexport const spec = defineSpec({\n  type: 'contact-bands',\n  aliases: ['contact/bands'],\n  sourceRuns: ['rmwj130iv031912'],\n  name: 'Contact, bands',\n  category: 'contact',\n  role: 'body',\n  description: 'Three full-width bands one after another: a header (label, heading and lead), a tinted band with a picture and caption beside a card of badge, place, address, contact links and three actions, then a band with a short heading beside opening hours as ruled rows and a small note. On a phone each band stacks into one column.',\n  schema,\n  defaults: {\n    eyebrow: 'Section name',\n    title: 'Say where and when the visitor can find you',\n    description: 'Say in one or two sentences what the visitor can do here.',\n    media: { src: '', alt: 'Show the place from outside' },\n    caption: 'Say what the picture shows',\n    badge: 'Label',\n    placeTitle: 'Name the place',\n    address: 'Give the full address',\n    phone: { label: 'Give the number', href: '#phone' },\n    email: { label: 'Give the address', href: '#email' },\n    primary: { label: 'Main action', href: '#primary' },\n    secondary: { label: 'Second action', href: '#secondary' },\n    tertiary: { label: 'Third action', href: '#tertiary' },\n    hoursTitle: 'Say what the times below cover',\n    hoursDescription: 'Say in one line what the visitor should know before coming.',\n    hours: [\n      { label: 'Name the first period', time: 'Give the times' },\n      { label: 'Name the second period', time: 'Give the times' },\n      { label: 'Name the third period', time: 'Give the times' },\n    ],\n    note: 'Say what changes the times, in one line',\n  },\n});\n"
    },
    {
      "path": "src/blocks/contact-bands/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/contact-bands/index.tsx",
      "content": "import { MapPin } from 'lucide-react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Gate, Opt, Section } from '../_shared/kit';\nimport { safeHref } from '../../ui/button';\nimport { useHeadingId } from '../_shared/c-proof-kit';\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\nconst contactLink = 'text-kh-ink hover:text-kh-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-kh-accent';\n\n// Three bands in order: the header; a tinted band with the picture (1.4) beside a card (1); the hours heading (1) beside ruled rows (1.4). One column on a phone.\nfunction ContactBands({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  return (\n    <Section bare labelledBy={id}>\n      <div className=\"mx-auto max-w-kh-page px-kh-gutter py-kh-section\">\n        <Opt path={['eyebrow']} value={props.eyebrow} className=\"font-kh-mono text-kh-caption uppercase tracking-wider text-kh-accent-ink\" placeholder=\"Eyebrow\" />\n        <div id={id}>\n          <Text path={['title']} value={props.title} as=\"h2\" className=\"mt-4 font-kh-display text-kh-title text-kh-ink\" />\n        </div>\n        <Opt path={['description']} value={props.description} multiline className=\"mt-4 max-w-kh-narrow text-kh-lead text-kh-muted\" placeholder=\"Description\" />\n      </div>\n\n      <div className=\"border-y border-kh-line bg-kh-surface\">\n        <div className=\"mx-auto grid max-w-kh-page items-center gap-12 px-kh-gutter py-kh-section @3xl:grid-cols-[1.4fr_1fr]\">\n          <div>\n            <Media path={['media']} value={props.media} ratio=\"4 / 3\" className=\"w-full rounded-kh-lg shadow-kh-2\" />\n            <Opt path={['caption']} value={props.caption} className=\"mt-3 text-kh-caption text-kh-muted\" placeholder=\"Caption\" />\n          </div>\n          <div>\n            <Opt path={['badge']} value={props.badge} as=\"span\" className=\"inline-flex rounded-kh-pill bg-kh-accent-soft px-3 py-1 font-kh-mono text-kh-caption text-kh-accent-ink\" placeholder=\"Badge\" />\n            <Text path={['placeTitle']} value={props.placeTitle} as=\"h3\" className=\"mt-4 font-kh-display text-kh-heading text-kh-ink\" />\n            <p className=\"mt-4 flex gap-3 text-kh-body text-kh-ink-2\">\n              <MapPin className=\"mt-1 size-5 shrink-0 text-kh-accent\" aria-hidden=\"true\" />\n              <Text path={['address']} value={props.address} as=\"span\" />\n            </p>\n            <ul className=\"mt-4 space-y-2 text-kh-body\">\n              <Gate label={props.phone.label}><li><a href={safeHref(props.phone.href)} className={contactLink}><Text path={['phone', 'label']} value={props.phone.label} as=\"span\" /></a></li></Gate>\n              <Gate label={props.email.label}><li><a href={safeHref(props.email.href)} className={contactLink}><Text path={['email', 'label']} value={props.email.label} as=\"span\" /></a></li></Gate>\n            </ul>\n            <div className=\"mt-8 flex flex-wrap items-center gap-4\">\n              <ActionLink path={['primary']} value={props.primary} size=\"md\" className=\"rounded-kh-pill\" />\n              <ActionLink path={['secondary']} value={props.secondary} variant=\"secondary\" size=\"md\" className=\"rounded-kh-pill\" />\n              <ActionLink path={['tertiary']} value={props.tertiary} variant=\"ghost\" size=\"md\" className=\"text-kh-small text-kh-accent-ink underline underline-offset-4\" />\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <div className=\"bg-kh-canvas\">\n        <div className=\"mx-auto grid max-w-kh-page gap-12 px-kh-gutter py-kh-section @3xl:grid-cols-[1fr_1.4fr]\">\n          <div>\n            <Opt path={['hoursTitle']} value={props.hoursTitle} as=\"h3\" className=\"font-kh-display text-kh-heading text-kh-ink\" placeholder=\"Hours heading\" />\n            <Opt path={['hoursDescription']} value={props.hoursDescription} multiline className=\"mt-4 text-kh-body text-kh-muted\" placeholder=\"Description\" />\n          </div>\n          <div>\n            <ul className=\"divide-y divide-kh-line border-y border-kh-line\">\n              {props.hours.map((h, i) => (\n                <li key={i} className=\"grid grid-cols-[1fr_auto] items-center gap-4 py-4 text-kh-body text-kh-ink\">\n                  <Text path={['hours', i, 'label']} value={h.label} as=\"span\" />\n                  <Opt path={['hours', i, 'time']} value={h.time} as=\"span\" className=\"font-kh-mono text-kh-small text-kh-ink-2\" placeholder=\"Times\" />\n                </li>\n              ))}\n            </ul>\n            <Opt path={['note']} value={props.note} className=\"mt-6 text-kh-small text-kh-muted\" placeholder=\"Note\" />\n          </div>\n        </div>\n      </div>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(ContactBands);\n"
    }
  ]
}
