{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "floating-actions",
  "type": "registry:block",
  "title": "Floating actions",
  "description": "A pill with a quiet link and the main action, centred on its own band so the one thing to do stays in reach. Sits in the flow of its section, never fixed over the page. Empty secondary label drops the link.",
  "categories": [
    "banner"
  ],
  "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"
  ],
  "files": [
    {
      "path": "src/blocks/floating-actions/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/floating-actions/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\nconst schema = z.object({\n  /** What the group is for, read by screen readers; not drawn. */\n  label: t(40),\n  /** The quiet way in, drawn as a plain link at the start of the pill. Empty drops it. */\n  secondary: link,\n  /** The one thing to do, drawn as the filled button at the end of the pill. */\n  primary: link,\n});\n\nexport const spec = defineSpec({\n  type: 'floating-actions',\n  aliases: ['banner/floating-actions'],\n  name: 'Floating actions',\n  category: 'banner',\n  role: 'foot',\n  description: 'A pill with a quiet link and the main action, centred on its own band so the one thing to do stays in reach. Sits in the flow of its section, never fixed over the page. Empty secondary label drops the link.',\n  schema,\n  defaults: {\n    label: 'Name what these actions are for',\n    secondary: { label: 'A second way in', href: '#more' },\n    primary: { label: 'Main action', href: '#start' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/floating-actions/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/floating-actions/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { ActionLink, Gate, Section } from '../_shared/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\n// In flow, a pill centred on its own band (a fixed bar is refused). Colours come from surface and ink tokens, so both are readable in light and dark.\n// The nav's name is copy like any other (a Text slot), shown to screen readers only.\nexport default function FloatingActions({ props }: BlockProps<Props>) {\n  const id = useId();\n  return (\n    <Section bare className=\"px-kh-gutter py-0\">\n      <span id={id} className=\"sr-only\"><Text path={['label']} value={props.label} /></span>\n      <nav aria-labelledby={props.label.trim() ? id : undefined} className=\"mx-auto flex w-fit max-w-full flex-wrap items-center justify-center gap-3 rounded-[2rem] border border-kh-line bg-kh-surface py-2.5 pe-2.5 ps-6 shadow-kh-3 @md:flex-nowrap @md:rounded-full\">\n        <Gate label={props.secondary.label}>\n          <a href={safeHref(props.secondary.href)} className=\"rounded-kh-sm text-kh-small font-medium text-kh-ink-2 hover:text-kh-ink focus-visible:outline-2 focus-visible:outline-(--kh-focus)\">\n            <Text path={['secondary', 'label']} value={props.secondary.label} as=\"span\" placeholder=\"Label\" />\n          </a>\n        </Gate>\n        <ActionLink path={['primary']} value={props.primary} size=\"md\" className=\"rounded-full\" />\n      </nav>\n    </Section>\n  );\n}\n"
    }
  ]
}
