useInputProps.d.ts 975 B

12345678910111213141516
  1. import type { SelectorProps } from '../../../interface';
  2. import type { InputProps } from '../Input';
  3. export default function useInputProps<DateType extends object = any>(props: Pick<SelectorProps, 'maskFormat' | 'format' | 'generateConfig' | 'locale' | 'preserveInvalidOnBlur' | 'inputReadOnly' | 'required' | 'aria-required' | 'onSubmit' | 'onFocus' | 'onBlur' | 'onInputChange' | 'onInvalid' | 'onOpenChange' | 'onKeyDown' | 'activeHelp' | 'name' | 'autoComplete' | 'open' | 'picker'> & {
  4. id?: string | string[];
  5. value?: DateType[];
  6. invalid?: boolean | [boolean, boolean];
  7. placeholder?: string | [string, string];
  8. disabled?: boolean | [boolean, boolean];
  9. onChange: (value: DateType | null, index?: number) => void;
  10. allHelp: boolean;
  11. activeIndex?: number | null;
  12. },
  13. /** Used for SinglePicker */
  14. postProps?: (info: {
  15. valueTexts: string[];
  16. }) => Partial<InputProps>): readonly [(index?: number) => InputProps, (date: DateType) => string];