@codeworker.br/govbr-tw-react
Version:
Biblioteca de componentes React usando Tailwind CSS que implementa o Padrão Digital de Governo.
44 lines (43 loc) • 1.75 kB
TypeScript
import { type VariantProps } from "class-variance-authority";
declare const wrapperVariants: (props?: ({
theme?: "dark" | "light" | null | undefined;
density?: "compact" | "comfy" | null | undefined;
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
export type InputFileLabels = {
pick?: string;
upload?: string;
acceptedHint?: string;
removeAria?: string;
prevPageAria?: string;
nextPageAria?: string;
pageXofY?: (x: number, y: number) => string;
clearAllAria?: string;
};
export type InputFileProps = {
accept?: string;
multiple?: boolean;
preview?: boolean;
theme?: VariantProps<typeof wrapperVariants>["theme"];
density?: VariantProps<typeof wrapperVariants>["density"];
className?: string;
onUpload?: (files: File[]) => Promise<void> | void;
onChange?: (files: File[]) => void;
/** i18n labels (json/obj) */
labels?: InputFileLabels;
/** Botões principais apenas com ícone (sem texto) */
onlyIcon?: boolean;
/** Desabilitar */
disabled?: boolean;
/** Controlado externamente (opcional) */
value?: File[];
setValue?: (files: File[]) => void;
/** Densidade repassada ao Button */
buttonDensity?: "high" | "default" | "low";
/** Variantes dos botões principais (use as variantes do seu <Button/>) */
pickVariant?: any;
uploadVariant?: any;
/** Paginação */
itemsPerPage?: number;
};
export default function InputFile({ accept, multiple, preview, theme, density, className, onUpload, onChange, labels, onlyIcon, disabled, value, setValue, buttonDensity, pickVariant, uploadVariant, itemsPerPage, }: InputFileProps): import("react/jsx-runtime").JSX.Element;
export {};