{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button-group",
  "title": "Button Group",
  "description": "Joined Astro buttons that share a border and corner radius.",
  "dependencies": [
    "class-variance-authority",
    "cn"
  ],
  "registryDependencies": [
    "@gnostic/separator"
  ],
  "files": [
    {
      "path": "packages/ui/src/components/ui/button-group/button-group-separator.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\nimport { cn } from \"cn\"\nimport { Separator } from \"../separator\"\ntype Props = ComponentProps<typeof Separator>\nconst { class: className, orientation = \"vertical\", ...props } = Astro.props\n---\n\n<Separator\n  orientation={orientation}\n  data-slot=\"button-group-separator\"\n  class={cn(\n    \"pointer-events-none relative z-2 bg-input before:absolute before:inset-0 has-[+[data-slot=input]:focus-within,+[data-slot=input-group]:focus-within,+[data-slot=select-trigger]:focus-visible+*,+[data-slot=number-field]:focus-within]:translate-x-px has-[+[data-slot=input]:focus-within,+[data-slot=input-group]:focus-within,+[data-slot=select-trigger]:focus-visible+*,+[data-slot=number-field]:focus-within]:bg-ring dark:before:bg-input/32 [[data-slot=input]:focus-within+&,[data-slot=input-group]:focus-within+&,[data-slot=select-trigger]:focus-visible+*+&,[data-slot=number-field]:focus-within+&,[data-slot=number-field]:focus-within+input+&]:bg-ring [[data-slot=input]:focus-within+&,[data-slot=input-group]:focus-within+&,[data-slot=select-trigger]:focus-visible+*+&,[data-slot=number-field]:focus-within+input+&]:-translate-x-px\",\n    className,\n  )}\n  {...props}\n/>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/button-group/button-group-separator.astro"
    },
    {
      "path": "packages/ui/src/components/ui/button-group/button-group-text.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cn } from \"cn\"\ntype Props = HTMLAttributes<\"div\">\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"button-group-text\"\n  class={cn(\n    \"relative inline-flex items-center gap-2 whitespace-nowrap rounded-lg border border-input bg-muted not-dark:bg-clip-padding px-[calc(--spacing(3)-1px)] text-base text-muted-foreground shadow-xs/5 outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] sm:text-sm dark:bg-input/64 dark:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:-mx-0.5 [&_svg]:shrink-0\",\n    className,\n  )}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/button-group/button-group-text.astro"
    },
    {
      "path": "packages/ui/src/components/ui/button-group/button-group-variants.ts",
      "content": "import { cva, type VariantProps } from 'class-variance-authority'\nexport const buttonGroupVariants = cva(\n    'dark:*:[[data-slot=separator]:has(~button:hover):not(:has(~[data-slot=separator]~[data-slot]:hover)),[data-slot=separator]:has(~[data-slot][aria-pressed=true]):not(:has(~[data-slot=separator]~[data-slot][aria-pressed=true]))]:before:bg-input/64 dark:*:[button:hover~[data-slot=separator]:not([data-slot]:hover~[data-slot=separator]~[data-slot=separator]),[data-slot][aria-pressed=true]~[data-slot=separator]:not([data-slot][aria-pressed=true]~[data-slot=separator]~[data-slot=separator])]:before:bg-input/64 flex w-fit *:focus-visible:z-1 *:has-focus-visible:z-1 has-[>[data-slot=button-group]]:gap-2',\n    {\n        defaultVariants: {\n            orientation: 'horizontal',\n        },\n        variants: {\n            orientation: {\n                horizontal:\n                    '*:data-slot:has-[~[data-slot]]:rounded-e-none *:data-slot:has-[~[data-slot]]:border-e-0 *:data-slot:has-[~[data-slot]]:before:rounded-e-none *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:inset-e-[-0.5px] *:pointer-coarse:after:min-w-auto *:[[data-slot]~[data-slot]]:rounded-s-none *:[[data-slot]~[data-slot]]:border-s-0 *:[[data-slot]~[data-slot]]:before:rounded-s-none *:[[data-slot]~[data-slot]:not([data-slot=separator])]:before:inset-s-[-0.5px]',\n                vertical:\n                    'flex-col *:data-slot:has-[~[data-slot]]:rounded-b-none *:data-slot:has-[~[data-slot]]:border-b-0 *:data-slot:has-[~[data-slot]]:before:rounded-b-none *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:bottom-[-0.5px] *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:hidden dark:*:first:before:block dark:*:last:before:hidden *:pointer-coarse:after:min-h-auto *:[[data-slot]~[data-slot]]:rounded-t-none *:[[data-slot]~[data-slot]]:border-t-0 *:[[data-slot]~[data-slot]]:before:rounded-t-none *:[[data-slot]~[data-slot]:not([data-slot=separator])]:before:top-[-0.5px]',\n            },\n        },\n    },\n)\n\nexport type ButtonGroupVariantProps = VariantProps<typeof buttonGroupVariants>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/button-group/button-group-variants.ts"
    },
    {
      "path": "packages/ui/src/components/ui/button-group/button-group.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\nimport { buttonGroupVariants } from \"./button-group-variants.ts\"\nimport type { ButtonGroupProps } from \"./types.ts\"\n\n/** Div attributes pass through. Give the group an accessible name. */\ntype Props = HTMLAttributes<\"div\"> & ButtonGroupProps\n\nconst { class: className, orientation = \"horizontal\", ...props } = Astro.props\n---\n\n<div\n  role=\"group\"\n  data-slot=\"button-group\"\n  data-orientation={orientation}\n  class={cn(buttonGroupVariants({ orientation }), className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/button-group/button-group.astro"
    },
    {
      "path": "packages/ui/src/components/ui/button-group/index.ts",
      "content": "export { default as ButtonGroup } from './button-group.astro'\nexport { default as ButtonGroupSeparator } from './button-group-separator.astro'\nexport { default as ButtonGroupText } from './button-group-text.astro'\nexport { buttonGroupVariants } from './button-group-variants.ts'\n\nexport type { ButtonGroupProps } from './types.ts'\n",
      "type": "registry:file",
      "target": "~/src/components/ui/button-group/index.ts"
    },
    {
      "path": "packages/ui/src/components/ui/button-group/types.ts",
      "content": "/**\n * Props for a joined set of buttons.\n * Div attributes such as `class`, `id`, and `aria-label` pass through.\n * Place each button directly inside the group.\n */\nexport interface ButtonGroupProps {\n    /**\n     * Direction of the joined controls.\n     *\n     * @default \"horizontal\"\n     */\n    orientation?: 'horizontal' | 'vertical'\n}\n",
      "type": "registry:file",
      "target": "~/src/components/ui/button-group/types.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "class-variance-authority": "^0.7.1",
      "cn": "0.5.2"
    }
  },
  "docs": "https://ui.gnosticai.com/components/button-group",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
