{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "field", "type": "registry:ui", "title": "Field", "files": [ { "path": "ui/field.tsrx", "type": "registry:ui", "target": "components/ui/field.tsrx", "content": "// Base UI base field — TRANSCRIBED from upstream's `bases/base-ui/ui/field.tsx` (maintainer-supplied),\n// class strings verbatim. Byte-for-byte the same component as the radix base apart from which\n// `Label` and `Separator` it imports.\n//\n// UPSTREAM DOES NOT USE THE `Field` PRIMITIVE HERE, even though @octanejs/base-ui ships one whose\n// parts line up exactly (Root/Control/Label/Description/Error/Validity/Item). That is worth stating\n// because the opposite is the natural guess, and it decides the class strings: `data-invalid` and\n// `data-disabled` on these elements are written by the CONSUMER, so `data-[invalid=true]:` and\n// `group-data-[disabled=true]/field:` are correct as written. Had this routed through `Field.Root`,\n// the primitive would emit BARE `data-invalid=\"\"` (see fieldValidityMapping) and every one of those\n// variants would silently match nothing.\n//\n// It also means `FieldLabel` is safe standalone: it renders this base's plain `