{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "field",
  "title": "Field",
  "description": "A shadcn-style field component built with Ark UI primitives.",
  "dependencies": ["@ark-ui/react"],
  "registryDependencies": ["input"],
  "files": [
    {
      "path": "src/components/ui/field.tsx",
      "content": "\"use client\";\n\nimport { Field as FieldPrimitive } from \"@ark-ui/react/field\";\nimport { Input } from \"@/components/ui/input\";\nimport { cn } from \"@/lib/utils\";\n\nexport const Field = ({ className, ...props }: FieldPrimitive.RootProps) => (\n  <FieldPrimitive.Root\n    className={cn(\"group/field flex w-full flex-col gap-1.5\", className)}\n    data-slot=\"field\"\n    {...props}\n  />\n);\n\nexport const FieldLabel = ({\n  className,\n  ...props\n}: FieldPrimitive.LabelProps) => (\n  <FieldPrimitive.Label\n    data-slot=\"field-label\"\n    className={cn(\n      \"text-sm font-medium text-foreground leading-none select-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 group-data-disabled/field:pointer-events-none group-data-disabled/field:opacity-64\",\n      className,\n    )}\n    {...props}\n  />\n);\n\nexport const FieldDescription = ({\n  className,\n  ...props\n}: FieldPrimitive.HelperTextProps) => (\n  <FieldPrimitive.HelperText\n    data-slot=\"field-description\"\n    className={cn(\"text-muted-foreground text-xs\", className)}\n    {...props}\n  />\n);\n\nexport const FieldError = ({\n  className,\n  ...props\n}: FieldPrimitive.ErrorTextProps) => (\n  <FieldPrimitive.ErrorText\n    data-slot=\"field-error\"\n    className={cn(\"text-destructive text-xs\", className)}\n    {...props}\n  />\n);\n\nexport const FieldRequiredIndicator = ({\n  className,\n  fallback = \"*\",\n  ...props\n}: FieldPrimitive.RequiredIndicatorProps) => (\n  <FieldPrimitive.RequiredIndicator\n    data-slot=\"field-required-indicator\"\n    fallback={fallback}\n    className={cn(\"text-destructive ms-0.5\", className)}\n    {...props}\n  />\n);\n\n/** Registers a custom control (e.g. styled `Input`) with field context — use `asChild`. */\nexport const FieldInput = (props: FieldPrimitive.InputProps) => {\n  if (props.asChild) {\n    return <FieldPrimitive.Input data-slot=\"field-control\" {...props} />;\n  }\n\n  return (\n    <FieldPrimitive.Input data-slot=\"field-input\" {...props} asChild>\n      <Input />\n    </FieldPrimitive.Input>\n  );\n};\n\nexport const FieldItem = (props: FieldPrimitive.ItemProps) => (\n  <FieldPrimitive.Item {...props} />\n);\n\nexport const FieldContext = FieldPrimitive.Context;\n\nexport type { UseFieldProps, UseFieldReturn } from \"@ark-ui/react/field\";\nexport {\n  FieldRootProvider,\n  useField,\n  useFieldContext,\n} from \"@ark-ui/react/field\";\n",
      "type": "registry:ui",
      "target": "src/components/ui/field.tsx"
    }
  ],
  "type": "registry:ui"
}
