analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
58 lines • 1.52 kB
TypeScript
/**
* Period enum for time-based filtering
*/
export declare enum Period {
SEVEN_DAYS = "7_DAYS",
ONE_MONTH = "1_MONTH",
THREE_MONTHS = "3_MONTHS",
SIX_MONTHS = "6_MONTHS",
ONE_YEAR = "1_YEAR"
}
/**
* Period tab configuration
*/
export interface PeriodTab {
value: string;
label: string;
}
/**
* Default period tabs matching the design system
*/
export declare const PERIOD_OPTIONS: readonly [{
readonly value: Period.SEVEN_DAYS;
readonly label: "7 dias";
}, {
readonly value: Period.ONE_MONTH;
readonly label: "1 mês";
}, {
readonly value: Period.THREE_MONTHS;
readonly label: "3 meses";
}, {
readonly value: Period.SIX_MONTHS;
readonly label: "6 meses";
}, {
readonly value: Period.ONE_YEAR;
readonly label: "1 ano";
}];
/**
* Period value type (derived from PERIOD_OPTIONS)
*/
export type PeriodValue = (typeof PERIOD_OPTIONS)[number]['value'];
/**
* Props for PeriodSelector component
*/
export interface PeriodSelectorProps {
/** Currently selected period value */
value: string;
/** Callback when period changes */
onChange: (value: string) => void;
/** Default value (used for uncontrolled mode) */
defaultValue?: string;
/** Custom period options (defaults to PERIOD_OPTIONS) */
options?: readonly PeriodTab[];
/** Period values to exclude from the list */
excludeValues?: string[];
/** Additional className for the container */
className?: string;
}
//# sourceMappingURL=types.d.ts.map