{
  "$schema": "https://registry.ui.frontic.com/item.schema.json",
  "title": "Field",
  "description": "Wraps one form control with its label, description and error, wires their ids and validates the value; most form controls join a Field placed around them.",
  "components": {
    "Field": "Groups a label, an input, a description and an error of one form field, and validates its input.",
    "FieldContent": "Groups the label and description that sit beside the control of a field.",
    "FieldDescription": "Gives help text for a field, such as what to enter.",
    "FieldError": "Shows why the input of a field is invalid, from its own validation, from the server or from a form library.",
    "FieldGroup": "Stacks several fields of a form together.",
    "FieldLabel": "Labels the input of a field.",
    "FieldLegend": "Titles a set of related fields.",
    "FieldSeparator": "Separates fields of a form, optionally with a short text in between.",
    "FieldSet": "Groups related fields under one legend.",
    "FieldTitle": "Shows the title of a field next to its description.",
    "FieldValidity": "Renders from the validation state of a field, such as a custom message or a strength meter."
  },
  "recipes": {
    "field": {
      "base": {
        "display": "flex",
        "width": "full",
        "gap": "{spacing.3}"
      }
    },
    "field-content": {
      "base": {
        "display": "flex",
        "flex": "1",
        "flexDirection": "column",
        "gap": "{spacing.1}"
      }
    },
    "field-description": {
      "base": {
        "extends": ["hint", "link-primary"],
        "lineHeight": "normal",
        "textAlign": "start",
        "textTransform": "none",
        "letterSpacing": "normal"
      }
    },
    "field-error": {
      "base": {
        "extends": "error"
      }
    },
    "field-group": {
      "base": {
        "display": "flex",
        "width": "full",
        "flexDirection": "column",
        "gap": "{spacing.10}"
      },
      "variants": {
        "kind": {
          "fields": {},
          "checkboxes": {
            "gap": "{spacing.3}"
          }
        }
      },
      "defaults": {
        "kind": "fields"
      }
    },
    "field-label": {
      "composes": ["disabled"],
      "base": {
        "extends": "label",
        "gap": "{spacing.2}",
        "lineHeight": "snug",
        "display": "flex",
        "width": "fit",
        "invalid": {
          "textColor": "{colors.destructive}"
        }
      },
      "variants": {
        "layout": {
          "default": {},
          "card": {
            "width": "full",
            "flexDirection": "column",
            "border": "{border.default}",
            "rounded": "{rounded.none}",
            "checkedWithin": {
              "backgroundColor": "{colors.primary/5}",
              "borderColor": "{colors.primary/30}"
            }
          },
          "beside": {
            "typography": "{typography.small}",
            "fontWeight": "normal",
            "textTransform": "none",
            "letterSpacing": "normal"
          }
        }
      },
      "defaults": {
        "layout": "default"
      }
    },
    "field-legend": {
      "base": {
        "marginBottom": "{spacing.3}"
      },
      "variants": {
        "variant": {
          "legend": {
            "typography": "{typography.body}",
            "fontWeight": "medium"
          },
          "label": {
            "typography": "{typography.caption}",
            "fontWeight": "semibold",
            "textTransform": "uppercase"
          }
        }
      },
      "defaults": {
        "variant": "legend"
      }
    },
    "field-separator": {
      "base": {
        "bleedY": "{spacing.2}",
        "typography": "{typography.small}",
        "height": "{spacing.5}"
      }
    },
    "field-separator-content": {
      "base": {
        "backgroundColor": "{colors.background}",
        "textColor": "{colors.muted-foreground}",
        "paddingX": "{spacing.2}"
      }
    },
    "field-set": {
      "base": {
        "display": "flex",
        "flexDirection": "column",
        "gap": "{spacing.6}"
      }
    }
  }
}
