import type { IntlShape } from 'react-intl'; export type CounterShow = 'always' | 'auto'; export type CounterProps = { /** * If a max-length is in use, this prop controls showing a visible and accessible counter * * @deprecated Use limit property instead */ showCounter?: boolean; /** * Max length of field * * @deprecated Use limit property instead */ maxLength?: number; /** * Configure length limit of this field, will by default show counter when * user is close to limit. Can be used to configure additional behaviors * or handle when the field is truncated. * * The value can either be a number or an object that can set the following: * * * **value**: number * * **show?**: 'always' or 'auto' (default) * * **truncate?**: true (default) or false * * **onPasteTruncated?**: a callback that fires when pasting text into * a field will cause the pasted content to be truncated * * ```ts * { * value: number * show?: 'always' | 'auto' * truncate?: boolean * onPasteTruncated?: () => void * } * ``` */ limit?: number | LimitConfig; }; export type LimitConfig = { value: number; show?: CounterShow; truncate?: boolean; onPasteTruncated?: () => void; }; export declare const getLimit: (length: number, { maxLength, showCounter, limit }: CounterProps, intl?: IntlShape) => { limit: number; showCounter: boolean; truncate: boolean; onPasteTruncated: (() => void) | undefined; count: string; overCount: boolean; nearCount: boolean; }; //# sourceMappingURL=limit-counter.d.ts.map