{
  "name": "field",
  "type": "registry:ui",
  "title": "Field",
  "description": "Field connects one form control with its label, description, validation state, and error message.",
  "registryDependencies": [
    "@siteplane/base"
  ],
  "dependencies": [
    "@base-ui/react@1.5.0"
  ],
  "files": [
    {
      "path": "src/components/ui/field.tsx",
      "type": "registry:ui",
      "content": "\"use client\";\n\nimport { Field as FieldPrimitive } from \"@base-ui/react/field\";\nimport type React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport function Field({\n  className,\n  ...props\n}: FieldPrimitive.Root.Props): React.ReactElement {\n  return (\n    <FieldPrimitive.Root\n      className={cn(\"flex flex-col items-start gap-2\", className)}\n      data-slot=\"field\"\n      {...props}\n    />\n  );\n}\n\nexport function FieldLabel({\n  className,\n  ...props\n}: FieldPrimitive.Label.Props): React.ReactElement {\n  return (\n    <FieldPrimitive.Label\n      className={cn(\n        \"inline-flex cursor-pointer items-center gap-2 font-medium text-base/4.5 text-foreground data-disabled:cursor-not-allowed data-disabled:opacity-64 has-disabled:cursor-not-allowed sm:text-sm/4\",\n        className,\n      )}\n      data-slot=\"field-label\"\n      {...props}\n    />\n  );\n}\n\nexport function FieldItem({\n  className,\n  ...props\n}: FieldPrimitive.Item.Props): React.ReactElement {\n  return (\n    <FieldPrimitive.Item\n      className={cn(\"flex\", className)}\n      data-slot=\"field-item\"\n      {...props}\n    />\n  );\n}\n\nexport function FieldDescription({\n  className,\n  ...props\n}: FieldPrimitive.Description.Props): React.ReactElement {\n  return (\n    <FieldPrimitive.Description\n      className={cn(\"text-muted-foreground text-xs\", className)}\n      data-slot=\"field-description\"\n      {...props}\n    />\n  );\n}\n\nexport function FieldError({\n  className,\n  ...props\n}: FieldPrimitive.Error.Props): React.ReactElement {\n  return (\n    <FieldPrimitive.Error\n      className={cn(\"text-destructive-foreground text-xs\", className)}\n      data-slot=\"field-error\"\n      {...props}\n    />\n  );\n}\n\nexport const FieldControl: typeof FieldPrimitive.Control =\n  FieldPrimitive.Control;\nexport const FieldValidity: typeof FieldPrimitive.Validity =\n  FieldPrimitive.Validity;\n\nexport { FieldPrimitive };\n"
    }
  ],
  "categories": [
    "form-controls"
  ],
  "docs": "# Field\n\n> Siteplane UI release `0.1.1`.\n\n## Public Purpose\n\nField connects one form control with its label, description, validation state,\nand error message.\n\n## Import\n\n`import { Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity } from \"@/components/ui/field\";`\n\n## Public API\n\n- `Field invalid` controls the complete external error state for form\n  libraries and keeps label, control, and error presentation synchronized.\n- `FieldLabel nativeLabel={false}` renders non-native label semantics for\n  button-like controls such as Select triggers, where a native label is not\n  appropriate.\n- `FieldItem disabled` disables and dims one item inside a larger active group.\n- `FieldControl` supports controlled `onValueChange(value, eventDetails)` in\n  addition to uncontrolled `defaultValue`.\n- Use `FieldValidity` when rendering validation details from Base UI state.\n\n## Public Motion\n\n- Field adds no local motion.\n- The contained control owns focus, pressed, popup, and validation transitions.\n- Error copy may appear without shifting the control itself.\n\n## Public Accessibility\n\n- Every visible control needs a connected `FieldLabel` or an accessible label.\n- Connect descriptions and errors through the Field context rather than manual\n  duplicate IDs.\n- Keep invalid state on the Field and control as required by the selected\n  primitive.\n- Use `nativeLabel={false}` only for non-labelable button-like controls; do not\n  remove a control’s accessible name.\n\n## Public Agent Guidance\n\n- Use Field as the standard wrapper for one control, label, description, and\n  error.\n- Do not render raw inputs without Field or another correctly connected label.\n- Prefer Field props and Base UI context to manual validation wiring.\n\n## Public Links\n\n- [Documentation and preview](https://ui.siteplane.io/docs/components/form-controls/field)\n\n- [Registry source](https://ui.siteplane.io/r/field.json)\n",
  "meta": {
    "siteplane:agentContractVersion": 1,
    "siteplane:docs": "https://ui.siteplane.io/docs/components/form-controls/field",
    "siteplane:releaseVersion": "0.1.1",
    "siteplane:sourceOwned": true
  },
  "devDependencies": []
}
