Input.d.ts 1.2 KB

12345678910111213141516171819202122232425262728
  1. import React from 'react';
  2. import type { InputRef, InputProps as RcInputProps } from 'rc-input';
  3. import { InputFocusOptions, triggerFocus } from 'rc-input/lib/utils/commonUtils';
  4. import type { InputStatus } from '../_util/statusUtils';
  5. import type { Variant } from '../config-provider';
  6. import type { SizeType } from '../config-provider/SizeContext';
  7. export type { InputFocusOptions };
  8. export type { InputRef };
  9. export { triggerFocus };
  10. type SemanticName = 'prefix' | 'suffix' | 'input' | 'count';
  11. export interface InputProps extends Omit<RcInputProps, 'wrapperClassName' | 'groupClassName' | 'inputClassName' | 'affixWrapperClassName' | 'classes'> {
  12. rootClassName?: string;
  13. size?: SizeType;
  14. disabled?: boolean;
  15. status?: InputStatus;
  16. /** @deprecated Use `variant="borderless"` instead. */
  17. bordered?: boolean;
  18. /**
  19. * @since 5.13.0
  20. * @default "outlined"
  21. */
  22. variant?: Variant;
  23. classNames?: Partial<Record<SemanticName, string>>;
  24. styles?: Partial<Record<SemanticName, React.CSSProperties>>;
  25. [key: `data-${string}`]: string | undefined;
  26. }
  27. declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
  28. export default Input;