// Generated by dts-bundle-generator v7.2.0 import React from 'react'; import { DragEvent, HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode } from 'react'; export type AspectRatio = "1/1" | "16/9" | "9/16" | "4/3" | "3/4" | "2/1" | "1/2"; export type Cursor = "auto" | "pointer" | "not-allowed" | "grab" | "inherit"; declare const fileUploader: { sprinkle: ((props: { aspectRatio?: "none" | AspectRatio | undefined; flexDirection?: "row" | "column" | undefined; cursor?: Cursor | undefined; backgroundColor?: "transparent" | "primary-surface" | "neutral-background" | undefined; borderColor?: "transparent" | "primary-interactive" | "ai-generativeInteractiveHover" | undefined; }) => string) & { properties: Set<"aspectRatio" | "backgroundColor" | "cursor" | "flexDirection" | "borderColor">; }; properties: { aspectRatio: readonly [ "none", ...AspectRatio[] ]; flexDirection: readonly [ "row", "column" ]; cursor: Cursor[]; backgroundColor: { "primary-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; "neutral-background": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; transparent: string; }; borderColor: { "primary-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; "ai-generativeInteractiveHover": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; transparent: string; }; borderRadius: { "0-5": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; "1": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; "2": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; "3": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; "4": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; "5": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; "6": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; full: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; half: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; }; }; classnames: { container: string; container__input: string; disabled: string; dragging: string; skeleton: string; asOverlay: string; overlay: string; overlay__content: string; overlay__content__text: string; overlay__image: string; }; }; export interface SkeletonProperties { /** * Width of the skeleton. Useful when the skeleton is inside an inline element with no width of its own. */ width: string; /** * Height of the skeleton. Useful when you don't want to adapt the skeleton to a text element but for instance a card. */ height: string; /** * The border radius of the skeleton. */ borderRadius?: string; /** * This is an attribute used to identify a DOM node for testing purposes. */ "data-testid"?: string; } export type SkeletonProps = SkeletonProperties & HTMLAttributes; export type FileUploaderSkeletonProperties = Partial> & Partial> & { /** * This is an attribute used to identify a DOM node for testing purposes. */ "data-testid"?: string; }; export type FileUploaderSkeletonProps = FileUploaderSkeletonProperties; export declare const FileUploaderSkeleton: React.FC; export interface FileUploaderOverlayProperties { /** * Title text displayed in the overlay */ title?: string; /** * Subtitle text displayed below the title */ subtitle?: string; /** * Source URL for the image displayed in the overlay */ imageSrc?: string; /** * Alt text for the image */ imageAlt?: string; /** * Border color of the overlay * @default primary-interactive */ borderColor?: keyof typeof fileUploader.properties.borderColor; /** * Background color of the overlay * @default primary-surface */ backgroundColor?: keyof typeof fileUploader.properties.backgroundColor; /** * Border radius of the overlay * @default 2 */ borderRadius?: keyof typeof fileUploader.properties.borderRadius; /** * Content to render inside the overlay */ children?: ReactNode; } export type FileUploaderOverlayProps = FileUploaderOverlayProperties & Omit, "title">; /** * Overlay component displayed during drag operations on FileUploader. * Renders a customizable visual feedback with optional title, subtitle and image. */ export declare const FileUploaderOverlay: React.FC; export interface FileUploaderComponents { Skeleton: typeof FileUploaderSkeleton; Overlay: typeof FileUploaderOverlay; } export interface FileUploaderProperties { /** * Provide additional context to the action. */ placeholder?: string; /** * Accept file types * @default image/jpeg,image/gif,image/png */ accept?: string; /** * Height value of the file uploader. Defaults to 100%. * @default 100% */ height?: string; /** * Width value of the file uploader. Defaults to 100%. * @default 100% */ width?: string; /** * Permitted aspect ratios for the size of the file uploader. * @default 1/1 */ aspectRatio?: (typeof fileUploader.properties.aspectRatio)[number]; /** * Defines the position of the placeholder in relation to the icon. * @default column */ flexDirection?: (typeof fileUploader.properties.flexDirection)[number]; /** * Callback fired when files are dropped (before validation) */ onDrop?: (event: DragEvent) => void; /** * Callback fired when all dropped files are rejected due to file type validation */ onDropReject?: (event: DragEvent) => void; /** * Callback fired when files are successfully accepted and processed */ onDropSuccess?: (event: DragEvent) => void; /** * Callback fired when an error occurs during file drop processing */ onError?: (error: Error) => void; /** * Content to render inside the file uploader container */ children?: ReactNode; /** * Custom overlay element to render when dragging files over the uploader. * When defined, this overlay will be displayed instead of children during drag operations. */ dragOverlay?: ReactNode; /** * When true, the file uploader will not be clickable and files can only be uploaded by dragging and dropping. Useful for invisible upload areas used along FileUploader.Overlay. * @default false */ disableClickUpload?: boolean; /** * When true, the file uploader will be rendered as an overlay. Useful for invisible upload areas used along FileUploader.Overlay. * @default false */ asOverlay?: boolean; } export type FileUploaderProps = FileUploaderProperties & { dragOverlay?: ReactElement; } & InputHTMLAttributes; export declare const FileUploader: React.FC & FileUploaderComponents; export {};