{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "field",
  "title": "Field",
  "description": "Composable form layout, descriptions and validation messaging.",
  "registryDependencies": [
    "@rivelle/utils"
  ],
  "files": [
    {
      "path": "registry/nova/ui/field.tsx",
      "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<\"fieldset\">) {\n  return (\n    <fieldset\n      data-slot=\"field-set\"\n      className={cn(\"grid min-w-0 gap-6\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction FieldLegend({\n  className,\n  variant = \"legend\",\n  ...props\n}: React.ComponentProps<\"legend\"> & { variant?: \"legend\" | \"label\" }) {\n  return (\n    <legend\n      data-slot=\"field-legend\"\n      data-variant={variant}\n      className={cn(\n        \"mb-1 font-semibold tracking-[-0.025em] data-[variant=legend]:text-lg data-[variant=label]:text-sm\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"field-group\"\n      className={cn(\"grid w-full gap-5\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction Field({\n  className,\n  orientation = \"vertical\",\n  ...props\n}: React.ComponentProps<\"div\"> & {\n  orientation?: \"vertical\" | \"horizontal\" | \"responsive\";\n}) {\n  return (\n    <div\n      data-slot=\"field\"\n      data-orientation={orientation}\n      className={cn(\n        \"group/field grid min-w-0 gap-2 data-[orientation=horizontal]:grid-cols-[minmax(0,.72fr)_minmax(0,1fr)] data-[orientation=horizontal]:items-start data-[orientation=responsive]:grid-cols-1 data-[orientation=responsive]:sm:grid-cols-[minmax(0,.72fr)_minmax(0,1fr)] data-[orientation=responsive]:sm:items-start\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction FieldLabel({ className, ...props }: React.ComponentProps<\"label\">) {\n  return (\n    <label\n      data-slot=\"field-label\"\n      className={cn(\n        \"flex w-fit items-center gap-2 text-sm font-semibold tracking-[-0.012em] group-has-[:disabled]/field:opacity-45\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"field-content\"\n      className={cn(\"grid min-w-0 gap-2\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"field-title\"\n      className={cn(\"text-sm font-semibold tracking-[-0.012em]\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"field-description\"\n      className={cn(\n        \"text-xs leading-relaxed text-muted-foreground [&_a]:font-medium [&_a]:text-primary [&_a]:underline-offset-4 hover:[&_a]:underline\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction FieldError({\n  className,\n  children,\n  errors,\n  ...props\n}: React.ComponentProps<\"div\"> & {\n  errors?: Array<{ message?: string } | undefined>;\n}) {\n  const content =\n    children ??\n    errors\n      ?.filter(Boolean)\n      .map((error) => error?.message)\n      .filter(Boolean)\n      .join(\", \");\n  if (!content) return null;\n  return (\n    <div\n      role=\"alert\"\n      data-slot=\"field-error\"\n      className={cn(\"text-xs font-medium text-destructive\", className)}\n      {...props}\n    >\n      {content}\n    </div>\n  );\n}\n\nfunction FieldSeparator({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"field-separator\"\n      className={cn(\n        \"relative my-1 flex h-5 items-center justify-center text-xs text-muted-foreground before:absolute before:inset-x-0 before:h-px before:bg-foreground/10\",\n        className,\n      )}\n      {...props}\n    >\n      {children && (\n        <span className=\"relative bg-background px-3\">{children}</span>\n      )}\n    </div>\n  );\n}\n\nexport {\n  Field,\n  FieldContent,\n  FieldDescription,\n  FieldError,\n  FieldGroup,\n  FieldLabel,\n  FieldLegend,\n  FieldSeparator,\n  FieldSet,\n  FieldTitle,\n};\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}