UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

72 lines 2.41 kB
import { TextareaHTMLAttributes, ReactNode } from 'react'; /** * TextArea size variants */ type TextAreaSize = 'small' | 'medium' | 'large' | 'extraLarge'; /** * TextArea visual state */ type TextAreaState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled'; /** * TextArea component props interface */ export type TextAreaProps = { /** Label text to display above the textarea */ label?: ReactNode; /** Size variant of the textarea */ size?: TextAreaSize; /** Visual state of the textarea */ state?: TextAreaState; /** Error message to display */ errorMessage?: string; /** Helper text to display */ helperMessage?: string; /** Additional CSS classes */ className?: string; /** Label CSS classes */ labelClassName?: string; /** Show character count when maxLength is provided */ showCharacterCount?: boolean; } & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>; /** * TextArea component for Analytica Ensino platforms * * A textarea component with essential states, sizes and themes. * Uses exact design specifications with 288px width, 96px height, and specific * color values. Includes Text component integration for consistent typography. * * @example * ```tsx * // Basic textarea * <TextArea label="Description" placeholder="Enter description..." /> * * // Small size * <TextArea size="small" label="Comment" /> * * // Invalid state * <TextArea state="invalid" label="Required field" errorMessage="This field is required" /> * * // Disabled state * <TextArea disabled label="Read-only field" /> * ``` */ declare const TextArea: import("react").ForwardRefExoticComponent<{ /** Label text to display above the textarea */ label?: ReactNode; /** Size variant of the textarea */ size?: TextAreaSize; /** Visual state of the textarea */ state?: TextAreaState; /** Error message to display */ errorMessage?: string; /** Helper text to display */ helperMessage?: string; /** Additional CSS classes */ className?: string; /** Label CSS classes */ labelClassName?: string; /** Show character count when maxLength is provided */ showCharacterCount?: boolean; } & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> & import("react").RefAttributes<HTMLTextAreaElement>>; export default TextArea; //# sourceMappingURL=TextArea.d.ts.map