import type { LabelHTMLAttributes, ReactNode } from 'react' import { forwardRef } from 'react' import { cx } from '../../utils/cx' import type { MayTextStyle } from '../../types' import type { TextTone, TextWeight } from '../Text/Text' // Value import: Label renders with Text's `.may-text` classes, and a type-only // import is erased at compile time — Storybook then code-splits the scale away // and the label renders unstyled. export interface LabelProps extends Omit, 'color'> { children?: ReactNode /** Id of the control this labels. */ htmlFor?: string /** Adds the required marker, plus the word itself for assistive tech. */ required?: boolean /** Dims to match a disabled control, and stops clicks reaching it. */ disabled?: boolean /** @default 'subheadline' */ variant?: MayTextStyle /** @default 'default' */ tone?: TextTone /** @default 'medium' */ weight?: TextWeight /** * The iOS grouped-form eyebrow: uppercase, tracked out, secondary — what * Settings uses above a section rather than beside a field. */ uppercase?: boolean } /** * A form label. * * Always a real `