import React$1 from "react"; import { JBTimeInputEventType, JBTimeInputWebComponent, TimeUnits, ValidationValue } from "jb-time-input"; import { JBElementStandardProps } from "jb-core/react"; //#region modules/jb-time-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: JBTimeInputEventType) => 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: JBTimeInputEventType) => void; onChange?: (e: JBTimeInputEventType) => void; onFocus?: (e: JBTimeInputEventType) => void; onBlur?: (e: JBTimeInputEventType) => void; onKeyDown?: (e: JBTimeInputEventType) => void; onKeyUp?: (e: JBTimeInputEventType) => void; onInput?: (e: JBTimeInputEventType) => void; onKeyPress?: (e: JBTimeInputEventType) => void; /** * when user press enter key */ onEnter?: (e: JBTimeInputEventType) => void; onBeforeInput?: (e: JBTimeInputEventType) => 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-time-input/react/lib/attributes-hook.d.ts type JBTimeInputAttributes = { value?: string | null; initialValue?: string | null; validationList?: ValidationItem[] | null; disabled?: boolean; secondEnabled?: boolean; frontalZero?: boolean; optionalUnits?: TimeUnits[] | null; showPersianNumber?: boolean; }; //#endregion //#region modules/jb-time-input/react/lib/module-declaration.d.ts declare module "react" { namespace JSX { interface IntrinsicElements { 'jb-time-input': JBTimeInputType; } interface JBTimeInputType extends React.DetailedHTMLProps, JBTimeInputWebComponent> { "type"?: string; "error"?: string; "label"?: string; "message"?: string; "placeholder"?: string; } } } //#endregion //#region modules/jb-time-input/react/lib/JBTimeInput.d.ts declare const JBTimeInput: React$1.ForwardRefExoticComponent & React$1.RefAttributes>; type TimeInputProps = EventProps & JBTimeInputAttributes & { label?: string | null; closeButtonText?: string | null; error?: string | null; placeholder?: string | null; message?: string | null; }; type Props = TimeInputProps & JBElementStandardProps; //#endregion export { JBTimeInput, Props };