Input.d.ts 1.3 KB

123456789101112131415161718192021222324252627
  1. import * as React from 'react';
  2. type InputRef = HTMLInputElement | HTMLTextAreaElement;
  3. interface InputProps {
  4. prefixCls: string;
  5. id: string;
  6. inputElement: React.ReactElement;
  7. disabled: boolean;
  8. autoFocus: boolean;
  9. autoComplete: string;
  10. editable: boolean;
  11. activeDescendantId?: string;
  12. value: string;
  13. maxLength?: number;
  14. open: boolean;
  15. tabIndex: number;
  16. /** Pass accessibility props to input */
  17. attrs: Record<string, unknown>;
  18. onKeyDown: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLElement>;
  19. onMouseDown: React.MouseEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLElement>;
  20. onChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLElement>;
  21. onPaste: React.ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLElement>;
  22. onBlur: React.FocusEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLElement>;
  23. onCompositionStart: React.CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLElement>;
  24. onCompositionEnd: React.CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLElement>;
  25. }
  26. declare const RefInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
  27. export default RefInput;