UNPKG

analytica-frontend-lib

Version:

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

200 lines 8.39 kB
import { HTMLAttributes, ReactNode } from 'react'; interface CardBaseProps extends HTMLAttributes<HTMLDivElement> { children: ReactNode; variant?: 'default' | 'compact' | 'minimal'; layout?: 'horizontal' | 'vertical'; padding?: 'none' | 'small' | 'medium' | 'large'; minHeight?: 'none' | 'small' | 'medium' | 'large'; cursor?: 'default' | 'pointer'; } declare const CardBase: import("react").ForwardRefExoticComponent<CardBaseProps & import("react").RefAttributes<HTMLDivElement>>; interface CardActivitiesResultsProps extends HTMLAttributes<HTMLDivElement> { icon: ReactNode; title: string; subTitle: string; header: string; description?: string; extended?: boolean; action?: 'warning' | 'success' | 'error' | 'info'; } declare const CardActivitiesResults: import("react").ForwardRefExoticComponent<CardActivitiesResultsProps & import("react").RefAttributes<HTMLDivElement>>; interface CardQuestionProps extends HTMLAttributes<HTMLDivElement> { header: string; state?: 'done' | 'undone' | 'pending'; onClickButton?: (valueButton?: unknown) => void; valueButton?: unknown; } declare const CardQuestions: import("react").ForwardRefExoticComponent<CardQuestionProps & import("react").RefAttributes<HTMLDivElement>>; interface CardProgressProps extends HTMLAttributes<HTMLDivElement> { header: string; subhead?: string; initialDate?: string; endDate?: string; progress?: number; direction?: 'horizontal' | 'vertical'; icon: ReactNode; color?: string; progressVariant?: 'blue' | 'green'; showDates?: boolean; } declare const CardProgress: import("react").ForwardRefExoticComponent<CardProgressProps & import("react").RefAttributes<HTMLDivElement>>; interface CardTopicProps extends HTMLAttributes<HTMLDivElement> { header: string; subHead?: string[]; progress: number; showPercentage?: boolean; progressVariant?: 'blue' | 'green'; } declare const CardTopic: import("react").ForwardRefExoticComponent<CardTopicProps & import("react").RefAttributes<HTMLDivElement>>; interface CardPerformanceProps extends HTMLAttributes<HTMLDivElement> { header: string; description?: string; progress?: number; labelProgress?: string; actionVariant?: 'button' | 'caret'; progressVariant?: 'blue' | 'green'; onClickButton?: (valueButton?: unknown) => void; valueButton?: unknown; } declare const CardPerformance: import("react").ForwardRefExoticComponent<CardPerformanceProps & import("react").RefAttributes<HTMLDivElement>>; interface CardResultsProps extends HTMLAttributes<HTMLDivElement> { header: string; icon: string; correct_answers: number; incorrect_answers: number; direction?: 'row' | 'col'; color?: string; } declare const CardResults: import("react").ForwardRefExoticComponent<CardResultsProps & import("react").RefAttributes<HTMLDivElement>>; interface CardStatusProps extends HTMLAttributes<HTMLDivElement> { header: string; status?: 'correct' | 'incorrect' | 'unanswered' | 'pending'; label?: string; } declare const CardStatus: import("react").ForwardRefExoticComponent<CardStatusProps & import("react").RefAttributes<HTMLDivElement>>; interface CardSettingsProps extends HTMLAttributes<HTMLDivElement> { icon: ReactNode; header: string; } declare const CardSettings: import("react").ForwardRefExoticComponent<CardSettingsProps & import("react").RefAttributes<HTMLDivElement>>; interface CardSupportProps extends HTMLAttributes<HTMLDivElement> { header: string; direction?: 'row' | 'col'; children: ReactNode; } declare const CardSupport: import("react").ForwardRefExoticComponent<CardSupportProps & import("react").RefAttributes<HTMLDivElement>>; interface CardForumProps<T = unknown> extends HTMLAttributes<HTMLDivElement> { title: string; content: string; comments: number; date: string; hour: string; onClickComments?: (value?: T) => void; valueComments?: T; onClickProfile?: (profile?: T) => void; valueProfile?: T; } declare const CardForum: import("react").ForwardRefExoticComponent<CardForumProps<unknown> & import("react").RefAttributes<HTMLDivElement>>; interface CardAudioProps extends HTMLAttributes<HTMLDivElement> { src?: string; title?: string; onPlay?: () => void; onPause?: () => void; onEnded?: () => void; onAudioTimeUpdate?: (currentTime: number, duration: number) => void; loop?: boolean; preload?: 'none' | 'metadata' | 'auto'; tracks?: Array<{ kind: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata'; src: string; srcLang: string; label: string; default?: boolean; }>; } declare const CardAudio: import("react").ForwardRefExoticComponent<CardAudioProps & import("react").RefAttributes<HTMLDivElement>>; interface CardSimuladoProps extends HTMLAttributes<HTMLDivElement> { title: string; duration?: string; info: string; backgroundColor: 'enem' | 'prova' | 'simuladao' | 'vestibular'; /** * Renders the card in a non-interactive "coming soon" state: greyed out, * not clickable, with an "Em breve" badge next to the title. */ comingSoon?: boolean; /** Disables interaction (greyed out, not clickable) without a badge. */ disabled?: boolean; } declare const CardSimulado: import("react").ForwardRefExoticComponent<CardSimuladoProps & import("react").RefAttributes<HTMLDivElement>>; interface CardTestProps extends Omit<HTMLAttributes<HTMLElement>, 'onSelect'> { title: string; duration?: string; questionsCount?: number; additionalInfo?: string; selected?: boolean; onSelect?: (selected: boolean) => void; } declare const CardTest: import("react").ForwardRefExoticComponent<CardTestProps & import("react").RefAttributes<HTMLElement>>; interface SimulationItem { id: string; title: string; type: 'enem' | 'prova' | 'simulado' | 'vestibular'; info: string; /** * Optional status badge (e.g. "Em andamento" / "Concluído"). When provided it * is rendered next to the type badge. `action` maps to the Badge color action. */ statusBadge?: { label: string; action: 'success' | 'warning' | 'info' | 'error'; }; } interface SimulationHistoryData { date: string; simulations: SimulationItem[]; } interface CardSimulationHistoryProps extends HTMLAttributes<HTMLDivElement> { data: SimulationHistoryData[]; onSimulationClick?: (simulation: SimulationItem) => void; } declare const CardSimulationHistory: import("react").ForwardRefExoticComponent<CardSimulationHistoryProps & import("react").RefAttributes<HTMLDivElement>>; export declare enum EssayStatus { DRAFT = "DRAFT", SUBMITTED = "SUBMITTED", CORRECTING = "CORRECTING", CORRECTED = "CORRECTED", ERROR = "ERROR" } export declare enum EssayReviewStatus { PENDING = "PENDING", APPROVED = "APPROVED", MODIFIED = "MODIFIED" } export interface EssayHistoryItem { id: string; /** Título exibido. Se null/undefined, o componente cai no `fallbackTitle` */ title: string | null; /** Título fallback (ex: título do tema) quando `title` está vazio */ fallbackTitle?: string; status: EssayStatus; /** Nota total (0..maxScore). null quando ainda não pontuou */ totalScore: number | null; /** Status da revisão do professor */ reviewStatus?: EssayReviewStatus | null; } export interface EssayHistoryData { /** Label da data do grupo (ex: "12 Fev") */ date: string; essays: EssayHistoryItem[]; } interface CardEssayHistoryProps extends HTMLAttributes<HTMLDivElement> { data: EssayHistoryData[]; /** Nota máxima pra compor o label "X de {maxScore}". Default: 1000 */ maxScore?: number; /** Callback ao clicar num item clicável (CORRECTED com score, ou ERROR) */ onEssayClick?: (essay: EssayHistoryItem) => void; } declare const CardEssayHistory: import("react").ForwardRefExoticComponent<CardEssayHistoryProps & import("react").RefAttributes<HTMLDivElement>>; export { CardBase, CardActivitiesResults, CardQuestions, CardProgress, CardTopic, CardPerformance, CardResults, CardStatus, CardSettings, CardSupport, CardForum, CardAudio, CardSimulado, CardTest, CardSimulationHistory, CardEssayHistory, }; //# sourceMappingURL=Card.d.ts.map