UNPKG

analytica-frontend-lib

Version:

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

75 lines 1.98 kB
import type { FilterConfig } from '../../Filter/useTableFilter/index'; export type FilterModalProps = { /** * Controls modal visibility */ isOpen: boolean; /** * Callback when modal should close */ onClose: () => void; /** * Filter configurations with categories */ filterConfigs: FilterConfig[]; /** * Callback when filters change (temporary, before applying) */ onFiltersChange: (configs: FilterConfig[]) => void; /** * Callback when "Aplicar" button is clicked */ onApply: () => void; /** * Callback when "Limpar filtros" button is clicked */ onClear: () => void; /** * Modal title * @default "Filtros" */ title?: string; /** * Modal size * @default "md" */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; /** * Apply button label * @default "Aplicar" */ applyLabel?: string; /** * Clear button label * @default "Limpar filtros" */ clearLabel?: string; }; /** * FilterModal component - A modal for table filtering with CheckboxGroup * * Integrates Modal, CheckboxGroup, and Button components to create a * complete filtering interface. Works with useTableFilter hook for URL synchronization. * * @example * ```tsx * const { filterConfigs, updateFilters, applyFilters, clearFilters } = useTableFilter( * initialConfigs, * { syncWithUrl: true } * ); * * <FilterModal * isOpen={isOpen} * onClose={() => setIsOpen(false)} * filterConfigs={filterConfigs} * onFiltersChange={updateFilters} * onApply={() => { * applyFilters(); * setIsOpen(false); * }} * onClear={clearFilters} * /> * ``` */ export declare const FilterModal: ({ isOpen, onClose, filterConfigs, onFiltersChange, onApply, onClear, title, size, applyLabel, clearLabel, }: FilterModalProps) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=FilterModal.d.ts.map