import React from 'react'; import { PropsWithMetadata } from '@highlight-ui/utils-commons'; export declare type SelectChipProps = PropsWithMetadata<{ /** * Sets the SelectChip's text. */ children: string; /** * Disables the SelectChip. Causes the `onRemove` prop to be ignored when this prop is set to `true`. */ disabled?: boolean; /** * Sets a callback for when the SelectChip is removed. Ignored when `disabled` is set to `true`. * * A removal event can happen when the SelectChip's remove icon is clicked or * when the SelectChip has focus and `Delete` or `Backspace` is pressed on the keyboard. */ onRemove?: (e: React.MouseEvent | React.KeyboardEvent) => void; /** * Sets a callback for when other keyboard keys are used on the SelectChip. Ignored when `disabled` is set to `true`. * * `onKeyDown` needs `onRemove` and/or `onClick` props to work. * * `onKeyDown` for this component doesn't handle `Delete` or `Backspace` keys which are handled by the `onRemove` * prop * @see onRemove */ onKeyDown?: (e: React.KeyboardEvent) => void; /** * Sets a callback for when the SelectChip is clicked. Ignored when `disabled` is set to `true`. * * A click event can happen when the SelectChip is clicked with a mouse pointer. */ onClick?: (e: React.MouseEvent) => void; /** * Allows providing a custom class name */ className?: React.HTMLAttributes['className']; /** * Allows providing a custom tabIndex number */ tabIndex?: React.HTMLAttributes['tabIndex']; }>; declare const SelectChip: React.ForwardRefExoticComponent<{ /** * Sets the SelectChip's text. */ children: string; /** * Disables the SelectChip. Causes the `onRemove` prop to be ignored when this prop is set to `true`. */ disabled?: boolean | undefined; /** * Sets a callback for when the SelectChip is removed. Ignored when `disabled` is set to `true`. * * A removal event can happen when the SelectChip's remove icon is clicked or * when the SelectChip has focus and `Delete` or `Backspace` is pressed on the keyboard. */ onRemove?: ((e: React.MouseEvent | React.KeyboardEvent) => void) | undefined; /** * Sets a callback for when other keyboard keys are used on the SelectChip. Ignored when `disabled` is set to `true`. * * `onKeyDown` needs `onRemove` and/or `onClick` props to work. * * `onKeyDown` for this component doesn't handle `Delete` or `Backspace` keys which are handled by the `onRemove` * prop * @see onRemove */ onKeyDown?: ((e: React.KeyboardEvent) => void) | undefined; /** * Sets a callback for when the SelectChip is clicked. Ignored when `disabled` is set to `true`. * * A click event can happen when the SelectChip is clicked with a mouse pointer. */ onClick?: ((e: React.MouseEvent) => void) | undefined; /** * Allows providing a custom class name */ className?: React.HTMLAttributes['className']; /** * Allows providing a custom tabIndex number */ tabIndex?: React.HTMLAttributes['tabIndex']; } & { metadata?: import("@highlight-ui/utils-commons").ComponentMetadata | undefined; } & React.RefAttributes>; export default SelectChip;