analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
151 lines (148 loc) • 6.07 kB
TypeScript
import * as react from 'react';
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: react.ForwardRefExoticComponent<CardBaseProps & 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: react.ForwardRefExoticComponent<CardActivitiesResultsProps & react.RefAttributes<HTMLDivElement>>;
interface CardQuestionProps extends HTMLAttributes<HTMLDivElement> {
header: string;
state?: 'done' | 'undone';
onClickButton?: (valueButton?: unknown) => void;
valueButton?: unknown;
}
declare const CardQuestions: react.ForwardRefExoticComponent<CardQuestionProps & 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: react.ForwardRefExoticComponent<CardProgressProps & react.RefAttributes<HTMLDivElement>>;
interface CardTopicProps extends HTMLAttributes<HTMLDivElement> {
header: string;
subHead?: string[];
progress: number;
showPercentage?: boolean;
progressVariant?: 'blue' | 'green';
}
declare const CardTopic: react.ForwardRefExoticComponent<CardTopicProps & 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: react.ForwardRefExoticComponent<CardPerformanceProps & react.RefAttributes<HTMLDivElement>>;
interface CardResultsProps extends HTMLAttributes<HTMLDivElement> {
header: string;
icon: ReactNode;
correct_answers: number;
incorrect_answers: number;
direction?: 'row' | 'col';
color?: string;
}
declare const CardResults: react.ForwardRefExoticComponent<CardResultsProps & react.RefAttributes<HTMLDivElement>>;
interface CardStatusProps extends HTMLAttributes<HTMLDivElement> {
header: string;
status?: 'correct' | 'incorrect';
label?: string;
}
declare const CardStatus: react.ForwardRefExoticComponent<CardStatusProps & react.RefAttributes<HTMLDivElement>>;
interface CardSettingsProps extends HTMLAttributes<HTMLDivElement> {
icon: ReactNode;
header: string;
}
declare const CardSettings: react.ForwardRefExoticComponent<CardSettingsProps & react.RefAttributes<HTMLDivElement>>;
interface CardSupportProps extends HTMLAttributes<HTMLDivElement> {
header: string;
direction?: 'row' | 'col';
children: ReactNode;
}
declare const CardSupport: react.ForwardRefExoticComponent<CardSupportProps & 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: react.ForwardRefExoticComponent<CardForumProps<unknown> & 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: react.ForwardRefExoticComponent<CardAudioProps & react.RefAttributes<HTMLDivElement>>;
interface CardSimuladoProps extends HTMLAttributes<HTMLDivElement> {
title: string;
duration?: string;
info: string;
backgroundColor: 'enem' | 'prova' | 'simuladao' | 'vestibular';
}
declare const CardSimulado: react.ForwardRefExoticComponent<CardSimuladoProps & 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: react.ForwardRefExoticComponent<CardTestProps & react.RefAttributes<HTMLElement>>;
interface SimulationItem {
id: string;
title: string;
type: 'enem' | 'prova' | 'simulado' | 'vestibular';
info: string;
}
interface SimulationHistoryData {
date: string;
simulations: SimulationItem[];
}
interface CardSimulationHistoryProps extends HTMLAttributes<HTMLDivElement> {
data: SimulationHistoryData[];
onSimulationClick?: (simulation: SimulationItem) => void;
}
declare const CardSimulationHistory: react.ForwardRefExoticComponent<CardSimulationHistoryProps & react.RefAttributes<HTMLDivElement>>;
export { CardActivitiesResults, CardAudio, CardBase, CardForum, CardPerformance, CardProgress, CardQuestions, CardResults, CardSettings, CardSimulado, CardSimulationHistory, CardStatus, CardSupport, CardTest, CardTopic };