import React$1, { PropsWithChildren } from "react"; import { JBPinInputEventType, JBPinInputWebComponent, ValidationValue } from "jb-pin-input"; import { JBElementStandardProps } from "jb-core/react"; //#region modules/jb-pin-input/react/lib/events-hook.d.ts type PropsEvent = { onChange?: (e: JBPinInputEventType) => void; onKeyUp?: (e: JBPinInputEventType) => void; onKeyDown?: (e: JBPinInputEventType) => void; onEnter?: (e: JBPinInputEventType) => void; onInput?: (e: JBPinInputEventType) => void; onBeforeInput?: (e: JBPinInputEventType) => void; onFocus?: (e: JBPinInputEventType) => void; onBlur?: (e: JBPinInputEventType) => void; onComplete?: (e: JBPinInputEventType) => 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-pin-input/react/lib/attributes-hook.d.ts type JBPinInputAttributes = { value?: string | number | null; initialValue?: string | number | null; required?: boolean; validationList?: ValidationItem[]; disabled?: boolean; inputmode?: string; autofocus?: boolean; charLength?: number; error?: string; }; //#endregion //#region modules/jb-pin-input/react/lib/module-declaration.d.ts declare module "react" { namespace JSX { interface IntrinsicElements { 'jb-pin-input': JBPinInputType; } interface JBPinInputType extends React.DetailedHTMLProps, JBPinInputWebComponent> { class?: string; label?: string; name?: string; message?: string; value?: string; initialValue?: string; } } } //#endregion //#region modules/jb-pin-input/react/lib/JBPinInput.d.ts export declare const JBPinInput: React$1.ForwardRefExoticComponent & React$1.RefAttributes>; export type Props = JBPinInputProps & JBElementStandardProps; type JBPinInputProps = PropsEvent & PropsWithChildren & { className?: string; label?: string; message?: string; }; //#endregion