import React$1, { PropsWithChildren } from "react"; import { JBFileInputEventType as JBFileInputEventType$1, JBFileInputWebComponent, ValidationValue } from "jb-file-input"; import { JBElementStandardProps } from "jb-core/react"; //#region modules/jb-file-input/react/lib/events-hook.d.ts type EventProps = { /** * when component loaded, in most cases component is already loaded before react mount so you dont need this but if you load web-component dynamically with lazy load it will be called after react mount */ onLoad?: (e: JBFileInputEventType$1) => void; /** * when all property set and ready to use, in most cases component is already loaded before react mount so you dont need this but if you load web-component dynamically with lazy load it will be called after react mount */ onInit?: (e: JBFileInputEventType$1) => void; /** * base on standard js `change` event so it only called on blur. use onInput to get every keyStroke */ onChange?: (e: JBFileInputEventType$1) => void; }; //#endregion //#region modules/jb-validation/dist/jb-validation.d.ts type ValidatorFunction = (value: ValidationValue) => boolean | string | Promise; type ValidationItem = { /** * @property key that will be used to identify validation item */ key?: any; /** * @property validation function or regex to match value with * @description if you want to use async validation you can return promise from validator function * @description if you leave it empty (undefined) it will always considered as invalid (used for manual error handler like server side validation or yup , zod,... validations) */ validator?: RegExp | ValidatorFunction; /** * @property error message that will be shown if validator return false or regex failed */ message: string; /** * @property type of error (category) its optional */ stateType?: keyof ValidityStateFlags; /** * @property defer validator execution until all non-deferred validation executed.(good for async validator) */ defer?: boolean; }; //#endregion //#region modules/jb-file-input/react/lib/attributes-hook.d.ts type JBFileInputAttributes = { acceptTypes?: string; placeholderTitle?: string; required?: boolean; validationList?: ValidationItem[]; }; //#endregion //#region modules/jb-file-input/react/lib/module-declaration.d.ts declare module "react" { namespace JSX { interface IntrinsicElements { 'jb-file-input': JBFileInputType; } interface JBFileInputType extends React.DetailedHTMLProps, JBFileInputWebComponent> { label?: string; name?: string; uploading?: string; "hide-download"?: string; } } } //#endregion //#region modules/jb-file-input/react/lib/JBFileInput.d.ts type JBFileInputEventType = T & { target: JBFileInputWebComponent; }; declare const JBFileInput: React$1.ForwardRefExoticComponent & React$1.RefAttributes>; type JBFileInputProps = PropsWithChildren; type Props = JBFileInputProps & JBElementStandardProps; //#endregion export { JBFileInput, JBFileInputEventType, Props };