import * as solid_js from 'solid-js'; import { Accessor, Setter, JSX, ValidComponent, ComponentProps } from 'solid-js'; import { ElementOf, PolymorphicProps } from '../polymorphic/index.js'; import { d as ButtonRootRenderProps } from '../button-root-da654b3e.js'; import { ValidationState } from '@kobalte/utils'; import { F as FormControlDataSet, a as FormControlDescription } from '../form-control-description-330657bc.js'; export { c as FileFieldDescriptionCommonProps, b as FileFieldDescriptionOptions, e as FileFieldDescriptionProps, d as FileFieldDescriptionRenderProps } from '../form-control-description-330657bc.js'; import { F as FormControlErrorMessage } from '../form-control-error-message-9efcbea8.js'; export { b as FileFieldErrorMessageCommonProps, a as FileFieldErrorMessageOptions, d as FileFieldErrorMessageProps, c as FileFieldErrorMessageRenderProps } from '../form-control-error-message-9efcbea8.js'; declare const FILE_FIELD_INTL_TRANSLATIONS: { bytes: string; kb: string; mb: string; gb: string; tb: string; }; type FileFieldIntlTranslations = typeof FILE_FIELD_INTL_TRANSLATIONS; type FileError = "TOO_MANY_FILES" | "FILE_INVALID_TYPE" | "FILE_TOO_LARGE" | "FILE_TOO_SMALL"; type FileRejection = { file: File; errors: FileError[]; }; type Details = { acceptedFiles: File[]; rejectedFiles: FileRejection[]; }; type Accept = string | string[] | undefined; interface FileFieldContextValue { translations: Accessor; inputId: Accessor; fileInputRef: Accessor; setFileInputRef: Setter; dropzoneRef: Accessor; setDropzoneRef: Setter; disabled: Accessor; multiple: Accessor; accept: Accessor; allowDragAndDrop: Accessor; processFiles: (files: File[]) => void; acceptedFiles: File[]; rejectedFiles: FileRejection[]; removeFile: (file: File) => void; } declare const FileFieldContext: solid_js.Context; declare function useFileFieldContext(): FileFieldContextValue; interface FileFieldDropzoneOptions { } interface FileFieldDropzoneCommonProps { ref: T | ((el: T) => void); onClick: JSX.EventHandlerUnion; onKeyDown: JSX.EventHandlerUnion; onDragOver: JSX.EventHandlerUnion; onDragLeave: JSX.EventHandlerUnion; onDrop: JSX.EventHandlerUnion; } interface FileFieldDropzoneRenderProps extends FileFieldDropzoneCommonProps { "aria-label": "dropzone"; role: "button"; tabindex: "0"; "aria-disabled": boolean | undefined; "data-dragging": boolean; } type FileFieldDropzoneProps = FileFieldDropzoneOptions & Partial>>; declare function FileFieldDropzone(props: PolymorphicProps>): JSX.Element; interface FileFieldHiddenInputProps extends ComponentProps<"input"> { } declare function FileFieldHiddenInput(props: FileFieldHiddenInputProps): JSX.Element; interface FileFieldItemOptions { } interface FileFieldItemCommonProps { } interface FileFieldItemRenderProps extends FileFieldItemCommonProps { } type FileFieldItemRootProps = FileFieldItemOptions & Partial>>; declare function FileFieldItem(props: PolymorphicProps>): JSX.Element; interface FileFieldItemDeleteTriggerOptions { } interface FileFieldItemDeleteTriggerCommonProps { onClick: JSX.EventHandlerUnion; } interface FileFieldItemDeleteTriggerRenderProps extends FileFieldItemDeleteTriggerCommonProps, ButtonRootRenderProps { disabled: boolean | undefined; } type FileFieldItemDeleteTriggerProps = Partial>>; declare function FileFieldItemDeleteTrigger(props: PolymorphicProps>): JSX.Element; interface FileFieldItemListOptions { children: (file: File) => JSX.Element; } interface FileFieldItemListCommonProps { } interface FileFieldItemListRenderProps extends FileFieldItemListCommonProps { children: JSX.Element; } type FileFieldItemListProps = FileFieldItemListOptions & Partial>>; declare function FileFieldItemList(props: PolymorphicProps>): JSX.Element; interface FileFieldItemNameOptions { } interface FileFieldItemNameCommonProps { children: JSX.Element; } interface FileFieldItemNameRenderProps extends FileFieldItemNameCommonProps { } type FileFieldItemNameProps = FileFieldItemNameOptions & Partial>>; declare function FileFieldItemName(props: PolymorphicProps>): JSX.Element; interface FileFieldItemPreviewOptions { type: string; } interface FileFieldItemPreviewCommonProps { } interface FileFieldItemPreviewRenderProps extends FileFieldItemPreviewCommonProps { } type FileFieldItemPreviewProps = FileFieldItemPreviewOptions & Partial>>; declare function FileFieldItemPreview(props: PolymorphicProps>): JSX.Element; interface FileFieldItemPreviewImageOptions { } interface FileFieldItemPreviewImageCommonProps { } interface FileFieldItemPreviewImageRenderProps extends FileFieldItemPreviewImageCommonProps { src: string; } type FileFieldItemPreviewImageProps = FileFieldItemPreviewImageOptions & Partial>>; declare function FileFieldItemPreviewImage(props: PolymorphicProps>): JSX.Element; interface FileFieldItemSizeOptions { precision?: number; } interface FileFieldItemSizeCommonProps { } interface FileFieldItemSizeRenderProps extends FileFieldItemSizeCommonProps { children: JSX.Element; } type FileFieldItemSizeProps = FileFieldItemSizeOptions & Partial>>; declare function FileFieldItemSize(props: PolymorphicProps>): JSX.Element; interface FileFieldLabelOptions { } interface FileFieldLabelCommonProps { } interface FileFieldLabelRenderProps extends FileFieldLabelCommonProps { for: string; } type FileFieldLabelProps = FileFieldLabelOptions & Partial>>; declare function FileFieldLabel(props: PolymorphicProps>): JSX.Element; interface FileFieldRootOptions { /** The localized strings of the component. */ translations?: FileFieldIntlTranslations; multiple?: boolean; accept?: Accept; maxFiles?: number; allowDragAndDrop?: boolean; maxFileSize?: number; minFileSize?: number; onFileAccept?: (files: File[]) => void; onFileReject?: (files: FileRejection[]) => void; onFileChange?: (details: Details) => void; validate?: (file: File) => FileError[] | null; id?: string; /** * The name of the select. * Submitted with its owning form as part of a name/value pair. */ name?: string; /** Whether the select should display its "valid" or "invalid" visual styling. */ validationState?: ValidationState; /** Whether the user must select an item before the owning form can be submitted. */ required?: boolean; /** Whether the select is disabled. */ disabled?: boolean; /** Whether the select is read only. */ readOnly?: boolean; } interface FileFieldRootCommonProps { id: string; } interface FileFieldRootRenderProps extends FileFieldRootCommonProps, FormControlDataSet { role: "group"; } type FileFieldRootProps = FileFieldRootOptions & Partial>>; declare function FileField$1(props: PolymorphicProps>): solid_js.JSX.Element; interface FileFieldTriggerOptions { } interface FileFieldTriggerCommonProps { onClick: JSX.EventHandlerUnion; } interface FileFieldTriggerRenderProps extends FileFieldTriggerCommonProps, FormControlDataSet, ButtonRootRenderProps { } type FileFieldTriggerProps = FileFieldTriggerOptions & Partial>>; declare function FileFieldTrigger(props: PolymorphicProps>): JSX.Element; declare const FileField: typeof FileField$1 & { Context: solid_js.Context; Dropzone: typeof FileFieldDropzone; HiddenInput: typeof FileFieldHiddenInput; Label: typeof FileFieldLabel; Trigger: typeof FileFieldTrigger; ItemList: typeof FileFieldItemList; Item: typeof FileFieldItem; ItemPreview: typeof FileFieldItemPreview; ItemPreviewImage: typeof FileFieldItemPreviewImage; ItemSize: typeof FileFieldItemSize; ItemDeleteTrigger: typeof FileFieldItemDeleteTrigger; ItemName: typeof FileFieldItemName; Description: typeof FormControlDescription; ErrorMessage: typeof FormControlErrorMessage; }; export { Accept, FileFieldContext as Context, FormControlDescription as Description, Details, FileFieldDropzone as Dropzone, FormControlErrorMessage as ErrorMessage, FileError, FileField, FileFieldContextValue, FileFieldDropzoneCommonProps, FileFieldDropzoneOptions, FileFieldDropzoneProps, FileFieldDropzoneRenderProps, FileFieldHiddenInputProps, FileFieldItemCommonProps, FileFieldItemDeleteTriggerCommonProps, FileFieldItemDeleteTriggerOptions, FileFieldItemDeleteTriggerProps, FileFieldItemDeleteTriggerRenderProps, FileFieldItemListCommonProps, FileFieldItemListOptions, FileFieldItemListProps, FileFieldItemListRenderProps, FileFieldItemNameCommonProps, FileFieldItemNameOptions, FileFieldItemNameProps, FileFieldItemNameRenderProps, FileFieldItemOptions, FileFieldItemPreviewCommonProps, FileFieldItemPreviewImageCommonProps, FileFieldItemPreviewImageOptions, FileFieldItemPreviewImageProps, FileFieldItemPreviewImageRenderProps, FileFieldItemPreviewOptions, FileFieldItemPreviewProps, FileFieldItemPreviewRenderProps, FileFieldItemRenderProps, FileFieldItemRootProps, FileFieldItemSizeCommonProps, FileFieldItemSizeOptions, FileFieldItemSizeProps, FileFieldItemSizeRenderProps, FileFieldLabelCommonProps, FileFieldLabelOptions, FileFieldLabelProps, FileFieldLabelRenderProps, FileFieldRootCommonProps, FileFieldRootOptions, FileFieldRootProps, FileFieldRootRenderProps, FileFieldTriggerCommonProps, FileFieldTriggerOptions, FileFieldTriggerProps, FileFieldTriggerRenderProps, FileRejection, FileFieldHiddenInput as HiddenInput, FileFieldItem as Item, FileFieldItemDeleteTrigger as ItemDeleteTrigger, FileFieldItemList as ItemList, FileFieldItemName as ItemName, FileFieldItemPreview as ItemPreview, FileFieldItemPreviewImage as ItemPreviewImage, FileFieldItemSize as ItemSize, FileFieldLabel as Label, FileField$1 as Root, FileFieldTrigger as Trigger, useFileFieldContext };