{"$schema":"https://ui.shadcn.com/schema/registry-item.json","author":"Eduardo Calvo <edu@smoothui.dev>","css":{},"dependencies":["@base-ui/react"],"description":"Base UI Field compound primitives for SmoothUI — label, description, control, and error.","devDependencies":[],"files":[{"content":"\"use client\";\n\nimport { Field as FieldPrimitive } from \"@base-ui/react/field\";\nimport { cn } from \"@/lib/utils\";\nimport type { ComponentProps } from \"react\";\n\nexport type FieldProps = ComponentProps<typeof FieldPrimitive.Root>;\nexport type FieldLabelProps = ComponentProps<typeof FieldPrimitive.Label>;\nexport type FieldDescriptionProps = ComponentProps<\n  typeof FieldPrimitive.Description\n>;\nexport type FieldErrorProps = ComponentProps<typeof FieldPrimitive.Error>;\nexport type FieldControlProps = ComponentProps<typeof FieldPrimitive.Control>;\n\n/**\n * SmoothUI Field — Base UI compound (no Radix twin).\n * Groups label, description, control, and error for accessible forms.\n */\nconst Field = ({ className, ...props }: FieldProps) => (\n  <FieldPrimitive.Root\n    className={cn(\"flex w-full flex-col gap-1.5\", className)}\n    data-slot=\"field\"\n    {...props}\n  />\n);\n\nconst FieldLabel = ({ className, ...props }: FieldLabelProps) => (\n  <FieldPrimitive.Label\n    className={cn(\n      \"font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:text-muted-foreground\",\n      className\n    )}\n    data-slot=\"field-label\"\n    {...props}\n  />\n);\n\nconst FieldDescription = ({ className, ...props }: FieldDescriptionProps) => (\n  <FieldPrimitive.Description\n    className={cn(\"text-muted-foreground text-sm\", className)}\n    data-slot=\"field-description\"\n    {...props}\n  />\n);\n\nconst FieldError = ({ className, ...props }: FieldErrorProps) => (\n  <FieldPrimitive.Error\n    className={cn(\"text-destructive text-sm\", className)}\n    data-slot=\"field-error\"\n    {...props}\n  />\n);\n\nconst FieldControl = ({ className, ...props }: FieldControlProps) => (\n  <FieldPrimitive.Control\n    className={cn(\n      \"state-transition focus-ring flex h-9 w-full rounded-md border border-foreground/25 bg-background px-3 text-sm shadow-xs outline-none placeholder:text-muted-foreground/60 focus-visible:border-ring disabled:cursor-not-allowed disabled:border-foreground/20 disabled:bg-muted disabled:text-muted-foreground disabled:placeholder:text-muted-foreground/70 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n      className\n    )}\n    data-slot=\"field-control\"\n    {...props}\n  />\n);\n\nexport { FieldControl, FieldDescription, FieldError, FieldLabel };\n\nexport default Field;\n","path":"index.tsx","target":"components/smoothui/field/index.tsx","type":"registry:ui"}],"name":"field","registryDependencies":["https://smoothui.dev/r/tokens.json"],"title":"Field","type":"registry:ui"}