{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "list-group",
  "title": "List Group",
  "description": "Vertical list with optional flush, horizontal, and contextual-color variants.",
  "dependencies": ["class-variance-authority"],
  "registryDependencies": ["https://indiacn.in/r/theme.json"],
  "files": [
    {
      "path": "components/ui/list-group.tsx",
      "content": "import { cva, type VariantProps } from 'class-variance-authority';\nimport { ComponentProps } from 'react';\n\nimport { cn } from '@/lib/utils';\n\n/*\n * UX4G list-group:\n * - container: rounded-lg, border 1px neutral-200, overflow-hidden, shared borders between items\n * - flush variant: no outer borders, no rounding (edge-to-edge)\n * - item: padding 0.5rem 1rem, border-top 1px neutral-200 (except first)\n * - hover (on action items): bg neutral-50\n * - active: bg primary, text neutral-0, border-primary\n * - disabled: opacity 0.5, pointer-events-none\n * - contextual themes: tonal backgrounds (primary-50, success-50, etc.)\n */\n\nconst LIST_GROUP_ITEM_VARIANTS = cva(\n  'relative flex items-center px-4 py-2 text-sm transition-colors border-t border-neutral-200 first:border-t-0',\n  {\n    variants: {\n      theme: {\n        default: 'text-neutral',\n        primary: 'bg-primary-50 text-primary-900',\n        secondary: 'bg-secondary-50 text-secondary-900',\n        success: 'bg-success-50 text-success-900',\n        danger: 'bg-danger-50 text-danger-900',\n        warning: 'bg-warning-50 text-warning-900',\n        info: 'bg-info-50 text-info-900',\n      },\n    },\n    defaultVariants: {\n      theme: 'default',\n    },\n  },\n);\n\ninterface IListGroupProps extends ComponentProps<'ul'> {\n  flush?: boolean;\n  horizontal?: boolean;\n}\n\n/** List group container. */\nfunction ListGroup({ className, flush, horizontal, ...props }: IListGroupProps) {\n  return (\n    <ul\n      role='list'\n      className={cn(\n        'flex list-none flex-col',\n        !flush && 'bg-neutral-0 overflow-hidden rounded-lg border border-neutral-200',\n        horizontal && 'flex-row',\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\ninterface IListGroupItemProps\n  extends ComponentProps<'li'>,\n    VariantProps<typeof LIST_GROUP_ITEM_VARIANTS> {\n  active?: boolean;\n  disabled?: boolean;\n  action?: boolean;\n}\n\n/** Individual item within a list group. */\nfunction ListGroupItem({\n  className,\n  theme,\n  active,\n  disabled,\n  action,\n  ...props\n}: IListGroupItemProps) {\n  return (\n    <li\n      aria-current={active ? 'page' : undefined}\n      className={cn(\n        LIST_GROUP_ITEM_VARIANTS({ theme, className }),\n        action && 'cursor-pointer hover:bg-neutral-50 active:bg-neutral-100',\n        active && 'bg-primary text-neutral-0 border-primary',\n        disabled && 'pointer-events-none opacity-50 select-none',\n      )}\n      {...props}\n    />\n  );\n}\n\ninterface IListGroupActionProps\n  extends ComponentProps<'a'>,\n    VariantProps<typeof LIST_GROUP_ITEM_VARIANTS> {\n  active?: boolean;\n  disabled?: boolean;\n}\n\n/** Actionable anchor item within a list group. */\nfunction ListGroupAction({ className, theme, active, disabled, ...props }: IListGroupActionProps) {\n  return (\n    <a\n      aria-current={active ? 'page' : undefined}\n      aria-disabled={disabled || undefined}\n      tabIndex={disabled ? -1 : undefined}\n      className={cn(\n        LIST_GROUP_ITEM_VARIANTS({ theme, className }),\n        'cursor-pointer no-underline hover:bg-neutral-50 active:bg-neutral-100',\n        active && 'bg-primary text-neutral-0 hover:bg-primary border-primary',\n        disabled && 'pointer-events-none opacity-50 select-none',\n      )}\n      {...props}\n    />\n  );\n}\n\nexport { ListGroup, ListGroupItem, ListGroupAction, LIST_GROUP_ITEM_VARIANTS };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
