UNPKG

analytica-frontend-lib

Version:

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

72 lines 2.31 kB
import { InputHTMLAttributes, ReactNode } from 'react'; /** * CheckBox size variants */ type CheckBoxSize = 'small' | 'medium' | 'large'; /** * CheckBox visual state */ type CheckBoxState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled'; /** * CheckBox component props interface */ export type CheckBoxProps = { /** Label text to display next to the checkbox */ label?: ReactNode; /** Size variant of the checkbox */ size?: CheckBoxSize; /** Visual state of the checkbox */ state?: CheckBoxState; /** Indeterminate state for partial selections */ indeterminate?: boolean; /** Error message to display */ errorMessage?: string; /** Helper text to display */ helperText?: string; /** Additional CSS classes */ className?: string; /** Label CSS classes */ labelClassName?: string; } & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>; /** * CheckBox component for Analytica Ensino platforms * * A checkbox component with essential states, sizes and themes. * Uses the Analytica Ensino Design System colors from styles.css with automatic * light/dark mode support. Includes Text component integration for consistent typography. * * @example * ```tsx * // Basic checkbox * <CheckBox label="Option" /> * * // Small size * <CheckBox size="small" label="Small option" /> * * // Invalid state * <CheckBox state="invalid" label="Required field" /> * * // Disabled state * <CheckBox disabled label="Disabled option" /> * ``` */ declare const CheckBox: import("react").ForwardRefExoticComponent<{ /** Label text to display next to the checkbox */ label?: ReactNode; /** Size variant of the checkbox */ size?: CheckBoxSize; /** Visual state of the checkbox */ state?: CheckBoxState; /** Indeterminate state for partial selections */ indeterminate?: boolean; /** Error message to display */ errorMessage?: string; /** Helper text to display */ helperText?: string; /** Additional CSS classes */ className?: string; /** Label CSS classes */ labelClassName?: string; } & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & import("react").RefAttributes<HTMLInputElement>>; export default CheckBox; //# sourceMappingURL=CheckBox.d.ts.map