@seplan/diti-ds
Version:
Reusable UI component library developed by DITI (Technology and Innovation Directorate of SEPLAN PI) based on Mantine and Tailwind CSS
861 lines (692 loc) • 28.6 kB
TypeScript
import { ClassValue } from 'clsx';
import { ComponentProps } from 'react';
import { default as default_2 } from 'react';
import { DrawerProps } from '@mantine/core';
import { FetchError } from '../errors/fetch-error';
import { ForwardRefExoticComponent } from 'react';
import { HTMLAttributes } from 'react';
import { JSX as JSX_2 } from 'react';
import { ModalProps } from '@mantine/core';
import { PopoverProps } from '@mantine/core';
import { PropsWithChildren } from 'react';
import { RadioCardProps } from '@mantine/core';
import { ReactNode } from 'react';
import { RefAttributes } from 'react';
export declare function AsyncFilter<T extends object = DefaultOption_2>({ children, loadOptions, renderOption, getOptionValue, getOptionLabel, getOptionDisabled, filterId, searchParamKey, filterFn, showSearch }: AsyncFilterProps<T>): JSX_2.Element;
export declare function AsyncFilterGroup<T extends object>({ title, searchParamKey, filterId, loadOptions, getOptionValue, getOptionLabel, renderOption, isDisabled, filterFn, showSearch, showSelectedOnTop, children }: AsyncFilterGroupProps<T>): JSX_2.Element;
declare interface AsyncFilterGroupProps<T extends object> {
title: string;
searchParamKey: string;
filterId: string;
loadOptions: () => Promise<T[]>;
getOptionValue?: (option: T) => string;
getOptionLabel?: (option: T) => string;
renderOption?: (option: T) => JSX.Element;
isDisabled?: (option: T) => boolean;
filterFn?: (option: T, search: string) => boolean;
showSearch?: boolean;
showSelectedOnTop?: boolean;
children?: React.ReactNode;
}
export declare const AsyncFilterPopover: <T extends object>({ children, loadOptions, renderOption, getOptionValue, getOptionLabel, isDisabled, filterId, searchParamKey, filterFn, showSearch, showSelectedOnTop, position, width }: AsyncFilterPopoverProps<T>) => JSX_2.Element;
declare interface AsyncFilterPopoverProps<T extends object> {
children?: React.ReactNode;
filterId: string;
loadOptions: () => Promise<T[]>;
renderOption?: (option: T) => JSX.Element;
getOptionValue?: (option: T) => string;
getOptionLabel?: (option: T) => string;
isDisabled?: (option: T) => boolean;
searchParamKey?: string;
filterFn?: (option: T, search: string) => boolean;
showSearch?: boolean;
showSelectedOnTop?: boolean;
position?: 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
width?: number | string;
}
export declare type AsyncFilterProps<T> = PropsWithChildren<{
loadOptions: () => Promise<T[]>;
renderOption?: (option: T) => JSX.Element;
filterId: string;
searchParamKey?: string;
filterFn?: (option: T, search: string) => boolean;
getOptionDisabled?: (option: T) => boolean;
showSearch?: boolean;
} & (IsDefaultOption_2<T> extends true ? {
getOptionValue?: (option: T) => string;
getOptionLabel?: (option: T) => string;
} : {
getOptionValue: (option: T) => string;
getOptionLabel: (option: T) => string;
})>;
export declare function AxisCard({ children, className }: AxisCardProps): default_2.JSX.Element;
export declare namespace AxisCard {
var Header: typeof CardHeader;
var Title: typeof CardTitle;
var Body: typeof CardBody;
var Metric: typeof CardMetric;
var BadgeGroup: typeof CardBadgeGroup;
}
declare interface AxisCardProps {
children: default_2.ReactNode;
className?: string;
}
export declare function BackButton(): JSX_2.Element;
export declare function BaseContent<T>({ options, renderOption, getOptionValue, isDisabled, filterFn, showSearch, showSelectedOnTop }: BaseContentProps<T>): JSX_2.Element;
export declare type BaseContentProps<T> = {
options: T[];
renderOption: (option: T) => JSX.Element;
getOptionValue: (option: T) => string;
getOptionLabel: (option: T) => string;
isDisabled: (option: T) => boolean;
filterFn: (option: T, search: string) => boolean;
showSearch?: boolean;
showSelectedOnTop?: boolean;
};
export declare type BaseFilterProps<T> = PropsWithChildren<{
renderOption?: (option: T) => JSX.Element;
searchParamKey: string;
filterFn?: (option: T, search: string) => boolean;
isDisabled?: (option: T) => boolean;
showSearch?: boolean;
showSelectedOnTop?: boolean;
position?: PopoverProps['position'];
} & (IsDefaultOption<T> extends true ? {
getOptionValue?: (option: T) => string;
getOptionLabel?: (option: T) => string;
} : {
getOptionValue: (option: T) => string;
getOptionLabel: (option: T) => string;
})>;
export declare interface BreadcrumbItem {
label: string;
href?: string;
}
export declare const Breadcrumbs: default_2.FC<BreadcrumbsProps>;
declare interface BreadcrumbsProps {
items: BreadcrumbItem[];
separator?: default_2.ReactNode;
maxVisibleItems?: number;
maxItemWidth?: string;
}
export declare function calculateExpiryTime(expiresIn: number, buffer?: number): number;
export declare const Card: {
Root: typeof CardRoot;
Header: typeof CardHeader_2;
Title: typeof CardTitle_2;
Subtitle: typeof CardSubtitle;
Value: typeof CardValue;
Description: typeof CardDescription;
Content: typeof CardContent;
Footer: typeof CardFooter;
Icon: typeof CardIcon;
Chart: typeof CardChart;
Trend: typeof CardTrend;
List: typeof CardList;
};
declare function CardBadgeGroup({ label, children, className }: CardBadgeGroupProps): default_2.JSX.Element;
declare interface CardBadgeGroupProps {
label?: string;
children: default_2.ReactNode;
className?: string;
}
declare function CardBody({ children, className }: CardBodyProps): default_2.JSX.Element;
declare interface CardBodyProps {
children: default_2.ReactNode;
className?: string;
}
declare function CardChart({ children, className, height }: CardChartProps): default_2.JSX.Element;
declare interface CardChartProps {
children: default_2.ReactNode;
className?: string;
height?: number;
}
declare function CardContent({ children, className }: CardContentProps): default_2.JSX.Element;
declare interface CardContentProps {
children: default_2.ReactNode;
className?: string;
}
declare function CardDescription({ children, className }: CardDescriptionProps): default_2.JSX.Element;
declare interface CardDescriptionProps {
children: default_2.ReactNode;
className?: string;
}
declare function CardFooter({ children, className, orientation }: CardFooterProps): default_2.JSX.Element;
declare interface CardFooterProps {
children: default_2.ReactNode;
className?: string;
orientation?: 'horizontal' | 'vertical';
}
declare function CardHeader({ children, className, linkUrl, onLinkClick }: CardHeaderProps): default_2.JSX.Element;
declare function CardHeader_2({ children, className, orientation }: CardHeaderProps_2): default_2.JSX.Element;
declare interface CardHeaderProps {
children: default_2.ReactNode;
className?: string;
linkUrl?: string;
onLinkClick?: (e: default_2.MouseEvent<HTMLButtonElement>) => void;
}
declare interface CardHeaderProps_2 {
children: default_2.ReactNode;
className?: string;
orientation?: 'horizontal' | 'vertical';
}
declare function CardIcon({ children, className }: CardIconProps): default_2.JSX.Element;
declare interface CardIconProps {
children: default_2.ReactNode;
className?: string;
}
declare function CardList({ children, className }: CardListProps): default_2.JSX.Element;
declare interface CardListProps {
children: default_2.ReactNode;
className?: string;
}
declare function CardMetric({ label, value, className }: CardMetricProps): default_2.JSX.Element;
declare interface CardMetricProps {
label: string;
value: string | number;
className?: string;
}
declare function CardRoot({ children, className, ...props }: CardRootProps & default_2.HTMLAttributes<HTMLDivElement>): default_2.JSX.Element;
declare interface CardRootProps {
children: default_2.ReactNode;
className?: string;
}
declare function CardSubtitle({ children, className }: CardSubtitleProps): default_2.JSX.Element;
declare interface CardSubtitleProps {
children: default_2.ReactNode;
className?: string;
}
declare function CardTitle({ children, className }: CardTitleProps): default_2.JSX.Element;
declare function CardTitle_2({ children, className }: CardTitleProps_2): default_2.JSX.Element;
declare interface CardTitleProps {
children: default_2.ReactNode;
className?: string;
}
declare interface CardTitleProps_2 {
children: default_2.ReactNode;
className?: string;
}
declare function CardTrend({ value }: CardTrendProps): default_2.JSX.Element;
declare interface CardTrendProps {
value: number;
}
declare function CardValue({ children, prefix, suffix, className }: CardValueProps): default_2.JSX.Element;
declare interface CardValueProps {
children: default_2.ReactNode;
/** Unit that appears before the value */
prefix?: string;
/** Unit that appears after the value */
suffix?: string;
className?: string;
}
export declare function ClearFiltersButton({ filterParamKeys, variant, size, className, children }: ClearFiltersButtonProps): JSX_2.Element | null;
declare interface ClearFiltersButtonProps {
/**
* Array of URL parameter keys that should be considered as filters.
* If not provided, all parameters will be considered filters.
*/
filterParamKeys?: string[];
/**
* Button variant
*/
variant?: 'outline' | 'subtle' | 'filled' | 'white' | 'default' | 'light';
/**
* Button size
*/
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
/**
* Custom className
*/
className?: string;
/**
* Button content. Defaults to "Limpar filtros" if not provided.
*/
children?: ReactNode;
}
export declare function cn(...inputs: ClassValue[]): string;
declare interface ColumnHeaderProps {
column: string;
title: default_2.ReactNode;
sortKey: string | null;
onSort: (key: string | null) => void;
className?: string;
}
export declare function ControlledPaginationFooter({ page, totalItems, itemsPerPage, onPageChange }: ControlledPaginationFooterProps): JSX_2.Element;
declare interface ControlledPaginationFooterProps {
page: number;
totalItems: number;
itemsPerPage?: number;
onPageChange?: (page: number) => void;
}
export declare function CounselorStatusBadge({ status }: StatusBadgeProps): JSX_2.Element;
export declare function DataListItem({ children, className, ...props }: DataListItemProps): default_2.JSX.Element;
declare interface DataListItemProps extends HTMLAttributes<HTMLDivElement> {
children: ReactNode;
}
export declare function DataListLabel({ children, className, ...props }: DataListLabelProps): default_2.JSX.Element;
declare interface DataListLabelProps extends HTMLAttributes<HTMLSpanElement> {
children: ReactNode;
}
export declare function DataListRoot({ children, className, orientation, spacing, minWidth, maxWidth, ...props }: DataListRootProps): default_2.JSX.Element;
declare interface DataListRootProps extends HTMLAttributes<HTMLElement> {
children: ReactNode;
orientation?: 'vertical' | 'horizontal';
spacing?: SpacingSize;
minWidth?: string;
maxWidth?: string;
}
export declare function DataListValue({ children, className, ...props }: DataListValueProps): default_2.JSX.Element;
declare interface DataListValueProps extends HTMLAttributes<HTMLSpanElement> {
children: ReactNode;
}
export declare function DateRangeFilter({ children, minDate, maxDate, shortcuts }: DateRangeFilterProps): default_2.JSX.Element;
declare interface DateRangeFilterProps {
children?: default_2.ReactNode;
minDate?: Date;
maxDate?: Date;
shortcuts?: Shortcut[];
}
export declare type DefaultOption = {
id: string;
label: string;
};
declare type DefaultOption_2 = {
id: string;
label: string;
};
export declare function EmptyState({ children, className, size }: EmptyStateProps): default_2.JSX.Element;
export declare namespace EmptyState {
var Header: typeof EmptyStateHeader;
var Description: typeof EmptyStateDescription;
var Icon: typeof EmptyStateIcon;
var Image: typeof EmptyStateImage;
var Actions: typeof EmptyStateActions;
}
declare function EmptyStateActions({ children, className }: EmptyStateActionsProps): default_2.JSX.Element;
declare interface EmptyStateActionsProps {
children: default_2.ReactNode;
className?: string;
}
declare function EmptyStateDescription({ children, className }: EmptyStateDescriptionProps): default_2.JSX.Element;
declare interface EmptyStateDescriptionProps {
children: default_2.ReactNode;
className?: string;
}
declare function EmptyStateHeader({ children, className }: EmptyStateHeaderProps): default_2.JSX.Element;
declare interface EmptyStateHeaderProps {
children: default_2.ReactNode;
className?: string;
}
declare function EmptyStateIcon({ children, className }: EmptyStateIconProps): default_2.JSX.Element;
declare interface EmptyStateIconProps {
children: default_2.ReactNode;
className?: string;
}
declare function EmptyStateImage({ src, alt, width, height, className }: EmptyStateImageProps): default_2.JSX.Element;
declare interface EmptyStateImageProps {
src: string;
alt: string;
width: number;
height: number;
className?: string;
}
declare interface EmptyStateProps {
children: default_2.ReactNode;
className?: string;
size?: 'narrow' | 'wide';
}
export { FetchError }
export declare const FilterButton: ForwardRefExoticComponent< {
children?: ReactNode | undefined;
} & RefAttributes<HTMLButtonElement>>;
export declare type FilterConfig = {
key: string;
label: string;
type: 'select' | 'multiselect' | 'date' | 'text';
options?: Array<{
value: string;
label: string;
}>;
placeholder?: string;
};
export declare function FilterGroup<T extends object>({ title, searchParamKey, filterId, options, loadOptions, getOptionValue, getOptionLabel, renderOption, isDisabled, filterFn, showSearch, showSelectedOnTop, children }: FilterGroupProps<T>): JSX_2.Element;
export declare function FilterGroupContent<T>({ groupKey, options, renderOption, getOptionValue, isDisabled, filterFn, showSearch, showSelectedOnTop }: FilterGroupContentProps<T>): JSX_2.Element;
declare interface FilterGroupContentProps<T> {
groupKey: string;
options: T[];
renderOption: (option: T) => JSX.Element;
getOptionValue: (option: T) => string;
getOptionLabel: (option: T) => string;
isDisabled: (option: T) => boolean;
filterFn: (option: T, search: string) => boolean;
showSearch?: boolean;
showSelectedOnTop?: boolean;
}
export declare type FilterGroupProps<T = DefaultOption> = {
title: string;
searchParamKey: string;
showSearch?: boolean;
showSelectedOnTop?: boolean;
children?: ReactNode;
} & (IsDefaultOption<T> extends true ? {
getOptionValue?: (option: T) => string;
getOptionLabel?: (option: T) => string;
renderOption?: (option: T) => JSX.Element;
isDisabled?: (option: T) => boolean;
filterFn?: (option: T, search: string) => boolean;
} : {
getOptionValue: (option: T) => string;
getOptionLabel: (option: T) => string;
renderOption?: (option: T) => JSX.Element;
isDisabled?: (option: T) => boolean;
filterFn?: (option: T, search: string) => boolean;
}) & ({
options: T[];
loadOptions?: never;
filterId?: never;
} | {
options?: never;
loadOptions: () => Promise<T[]>;
filterId: string;
});
declare type FilterGroupState = {
[key: string]: Set<string>;
};
export declare function FilterManager(props: FilterManagerProps): JSX_2.Element;
export declare type FilterManagerProps = {
children?: ReactNode;
onApply?: () => void;
buttonText?: string;
filters?: Record<string, any>;
onFiltersChange?: (filters: Record<string, any>) => void;
config?: FilterConfig[];
};
export declare const FilterPopover: <T extends object>({ children, loadOptions, options, renderOption, getOptionValue, getOptionLabel, isDisabled, filterId, searchParamKey, filterFn, showSearch, showSelectedOnTop, position, width }: FilterPopoverProps<T>) => JSX_2.Element;
export declare type FilterPopoverProps<T> = ({
options: T[];
loadOptions?: never;
filterId?: string;
} | {
options?: never;
loadOptions: () => Promise<T[]>;
filterId: string;
}) & FilterPopoverPropsBase<T>;
declare type FilterPopoverPropsBase<T> = PropsWithChildren<BaseFilterProps<T> & {
width?: number | string;
}>;
export declare const FiltersButton: ForwardRefExoticComponent<FiltersButtonProps & RefAttributes<HTMLButtonElement>>;
declare interface FiltersButtonProps {
onClick: () => void;
children?: React.ReactNode;
}
declare type FiltersContextType = {
filterGroups: FilterGroupState;
getGroupSelected: (groupKey: string) => Set<string>;
toggleOption: (groupKey: string, value: string) => void;
clearGroup: (groupKey: string) => void;
clearAll: () => void;
getTotalSelectedCount: () => number;
getGroupSelectedCount: (groupKey: string) => number;
page: number | null;
filters: Record<string, any>;
setFilters: (filters: Record<string, any>) => void;
};
export declare function FiltersModal({ opened, onClose, onApply, children, modalProps }: FiltersModalProps): JSX_2.Element;
export declare type FiltersModalProps = {
opened: boolean;
onClose: () => void;
onApply: () => void;
title?: string;
children: ReactNode;
modalProps?: Partial<ModalProps>;
};
export declare function FiltersProvider({ children, groupKeys }: PropsWithChildren<{
groupKeys?: string[];
}>): JSX_2.Element;
export declare type FilterValue = string | string[] | null | undefined;
export declare function formatCPF(cpf: string): string;
export declare function formatCurrency(value: number | string): string;
export declare function formatDate(date: Date | string, locale?: string, options?: Intl.DateTimeFormatOptions): string;
export declare const FormDrawer: {
Root: typeof FormDrawerRoot;
Header: typeof FormDrawerHeader;
Content: typeof FormDrawerContent;
Footer: typeof FormDrawerFooter;
};
declare function FormDrawerContent({ children }: FormDrawerContentProps): JSX_2.Element;
declare interface FormDrawerContentProps {
children: ReactNode;
}
declare function FormDrawerFooter({ children }: PropsWithChildren): JSX_2.Element;
declare function FormDrawerHeader({ children }: PropsWithChildren): JSX_2.Element;
declare function FormDrawerRoot({ children, onClose, ...props }: FormDrawerRootProps): JSX_2.Element;
declare interface FormDrawerRootProps extends Omit<DrawerProps, 'children'> {
children: ReactNode;
onClose: () => void;
}
export declare function ImagePlaceholder({ iconClassName, className, ...props }: ImagePlaceholderProps): JSX_2.Element;
declare interface ImagePlaceholderProps extends ComponentProps<'div'> {
iconClassName?: string;
}
export declare type IsDefaultOption<T> = T extends DefaultOption ? true : false;
declare type IsDefaultOption_2<T> = T extends DefaultOption_2 ? true : false;
export declare function isValidCPF(cpf: string): boolean;
export declare function Label({ children }: PropsWithChildren): JSX_2.Element;
export declare type LegacyFilterGroup<T> = {
id: string;
title: string;
searchParamKey: string;
type: 'static' | 'async';
options?: T[];
loadOptions?: () => Promise<T[]>;
renderOption?: (option: T) => JSX.Element;
getOptionValue?: (option: T) => string;
getOptionLabel?: (option: T) => string;
isDisabled?: (option: T) => boolean;
filterFn?: (option: T, search: string) => boolean;
showSearch?: boolean;
showSelectedOnTop?: boolean;
};
export declare function Logo(): JSX_2.Element;
export declare function LogoHorizontal(): JSX_2.Element;
/**
* Navigation tabs component using Mantine Tabs
* Gets state and handlers from context
*/
export declare function NavigationTabs({ children, className, tabs, activeTab: externalActiveTab, onTabChange }: NavigationTabsProps): default_2.JSX.Element;
/**
* Actions panel that renders only when its value matches the active tab
* Sibling to NavigationTabs, not nested inside
*/
export declare function NavigationTabsActions({ children, value, className }: NavigationTabsActionsProps): default_2.JSX.Element | null;
export declare interface NavigationTabsActionsProps {
children: default_2.ReactNode;
value: string;
className?: string;
}
export declare function NavigationTabsContainer(props: NavigationTabsContainerProps): default_2.JSX.Element;
export declare interface NavigationTabsContainerProps {
children: default_2.ReactNode;
className?: string;
basePath: string;
}
/**
* Individual navigation tab item
* Uses Mantine TabsTab behind the hood with automatic active detection
* Supports leftSection and rightSection for icons or other content
*/
export declare function NavigationTabsItem({ children, value, leftSection, rightSection, className }: NavigationTabsItemProps): default_2.JSX.Element;
export declare interface NavigationTabsItemProps {
children: default_2.ReactNode;
value: string;
leftSection?: default_2.ReactNode;
rightSection?: default_2.ReactNode;
className?: string;
}
export declare interface NavigationTabsProps {
children?: default_2.ReactNode;
className?: string;
tabs?: Array<{
label: string;
value: string;
count?: number;
}>;
activeTab?: string;
onTabChange?: (tab: string) => void;
}
/**
* Normalizes text for search by removing accents and converting to lowercase
*/
export declare function normalizeForSearch(str: string): string;
export declare function OptionalInputLabel({ children }: {
children: React.ReactNode;
}): JSX_2.Element;
declare interface QRCodeOptions {
url: string;
backgroundImagePath?: string;
orientation?: 'portrait' | 'landscape';
qrSize?: number;
qrPositionX?: number;
qrPositionY?: number;
title?: string;
fileName?: string;
}
export declare function RadioCard({ value, label, description, disabled, disabledTooltip }: RadioCardProps & {
label: string;
description?: string;
disabledTooltip?: string;
}): JSX_2.Element;
export declare function removeAccents(str: string): string;
export declare function SearchInput(props: SearchInputProps): JSX_2.Element;
export declare type SearchInputProps = {
placeholder?: string;
className?: string;
inputClassName?: string;
onSearch?: (value: string) => void;
debounceMs?: number;
};
export declare type SelectedItemsContextType = {
selectedItems: Set<string>;
toggle: (value: string) => void;
clear: () => void;
};
export declare function SelectedItemsProvider({ children, searchParamKey }: PropsWithChildren<{
searchParamKey?: string;
}>): JSX_2.Element;
export declare function SeplanAppsBar({ currentApp, className, contentClassName }: SeplanAppsBarProps): JSX_2.Element;
declare interface SeplanAppsBarProps {
currentApp?: string;
className?: string;
contentClassName?: string;
}
declare type Shortcut = {
label: string;
fn: () => {
fromDate: Date;
toDate: Date;
};
};
export declare function SortableColumnHeader({ column, title, sortKey, onSort, className }: ColumnHeaderProps): JSX_2.Element;
export declare interface SortableColumnProps {
column: string;
title: default_2.ReactNode;
sortKey?: string | null;
onSort?: (key: string | null) => void;
className?: string;
}
declare const spacingMap: {
readonly xs: 2;
readonly sm: 3;
readonly md: 4;
readonly lg: 6;
readonly xl: 8;
};
declare type SpacingSize = keyof typeof spacingMap;
export declare function StaticFilterGroup<T extends object>({ title, searchParamKey, options, getOptionValue, getOptionLabel, renderOption, isDisabled, filterFn, showSearch, showSelectedOnTop, children }: StaticFilterGroupProps<T>): JSX_2.Element;
declare interface StaticFilterGroupProps<T extends object> {
title: string;
searchParamKey: string;
options: T[];
getOptionValue?: (option: T) => string;
getOptionLabel?: (option: T) => string;
renderOption?: (option: T) => JSX.Element;
isDisabled?: (option: T) => boolean;
filterFn?: (option: T, search: string) => boolean;
showSearch?: boolean;
showSelectedOnTop?: boolean;
children?: React.ReactNode;
}
export declare const StaticFilterPopover: <T extends object>({ children, options, renderOption, getOptionValue, getOptionLabel, isDisabled, searchParamKey, filterFn, showSearch, showSelectedOnTop, position, width }: StaticFilterPopoverProps<T>) => JSX_2.Element;
declare interface StaticFilterPopoverProps<T extends object> {
children?: React.ReactNode;
options: T[];
renderOption?: (option: T) => JSX.Element;
getOptionValue?: (option: T) => string;
getOptionLabel?: (option: T) => string;
isDisabled?: (option: T) => boolean;
searchParamKey?: string;
filterFn?: (option: T, search: string) => boolean;
showSearch?: boolean;
showSelectedOnTop?: boolean;
position?: 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
width?: number | string;
}
declare type Status = 'PENDENTE' | 'APROVADO' | 'REJEITADO';
declare interface StatusBadgeProps {
status: Status;
}
export declare function UrlPaginationFooter({ totalItems, itemsPerPage, queryKey, shallow, onPageChange }: {
totalItems: number;
itemsPerPage: number;
queryKey?: string;
shallow?: boolean;
onPageChange?: (page: number) => void;
}): JSX_2.Element;
export declare function useClipboard(timeout?: number): {
copied: boolean;
copy: (text: string) => Promise<void>;
};
/**
* Custom hook for downloading blobs from API endpoints
* @param options - Optional callbacks for success and error handling
* @returns Object with downloadBlob function, loading state, and error state
*/
export declare function useDownloadBlob(options?: UseDownloadBlobOptions): UseDownloadBlobReturn;
declare interface UseDownloadBlobOptions {
onSuccess?: () => void;
onError?: (error: Error) => void;
}
declare interface UseDownloadBlobReturn {
downloadBlob: (url: string, filename: string, params?: Record<string, string | number | boolean | string[] | undefined>) => Promise<void>;
isLoading: boolean;
error: Error | null;
}
export declare const useFilters: () => FiltersContextType;
export declare function useMediaQuery(query: string): boolean;
export declare function usePaginationReset({ shallow }?: UsePaginationResetParams): {
page: number;
resetPagination: () => void;
};
declare type UsePaginationResetParams = Partial<{
shallow: boolean;
}>;
export declare function useQRCodeGenerator(): {
isGenerating: boolean;
generateAndDownloadPDF: ({ url, backgroundImagePath, orientation, qrSize, qrPositionX, qrPositionY, title, fileName }: QRCodeOptions) => Promise<void>;
};
export declare function useSelectedItems(): SelectedItemsContextType;
export declare const useSortableColumn: (column: string, sortKey: string | null) => {
isSorted: boolean;
isDescending: boolean;
};
export declare function ValueRangeFilter({ min, max, data, children }: ValueRangeFilterProps): default_2.JSX.Element;
declare interface ValueRangeFilterProps {
min: number;
max: number;
data: {
value: number;
count: number;
}[];
children: default_2.ReactNode;
}
export { }