import * as React from "react"; import * as PropTypes from "prop-types"; import { MaxWidthProps, MinWidthProps, WidthProps, FlexItemSetProps, PositionSetProps, MarginProps } from "./system"; import { OptionalResponsiveProp } from "./system/utils/types"; import { TooltipAnchorProps } from "./types/tooltip_anchor_props"; import { SelectOptionValue, SelectOption } from "./select_and_select_buttons_helpers"; import { ControlSizeProp } from "./control_sizes"; /** * Style props shared between the following components. * * {@link Select}, {@link SelectSynced} * * {@link TablePicker}, {@link TablePickerSynced} * * {@link ViewPicker}, {@link ViewPickerSynced} * * {@link FieldPicker}, {@link FieldPickerSynced} * * Also accepts: * * {@link FlexItemSetProps} * * {@link MarginProps} * * {@link MaxWidthProps} * * {@link MinWidthProps} * * {@link PositionSetProps} * * {@link MaxWidthProps} * * @noInheritDoc */ interface SelectStyleProps extends MaxWidthProps, MinWidthProps, WidthProps, FlexItemSetProps, PositionSetProps, MarginProps { /** Defines the display type of an element, which consists of the two basic qualities of how an element generates boxes — the outer display type defining how the box participates in flow layout, and the inner display type defining how the children of the box are laid out. */ display?: OptionalResponsiveProp<"inline-flex" | "flex" | "none">; } /** * Props shared between the following components: * * {@link Select}, {@link SelectSynced} * * {@link TablePicker}, {@link TablePickerSynced} * * {@link ViewPicker}, {@link ViewPickerSynced} * * {@link FieldPicker}, {@link FieldPickerSynced} * * @noInheritDoc */ export interface SharedSelectBaseProps extends TooltipAnchorProps, SelectStyleProps { /** The size of the select. */ size?: ControlSizeProp; /** Additional class names to apply to the select. */ className?: string; /** The `autoFocus` attribute. */ autoFocus?: boolean; /** The `id` attribute. */ id?: string; /** The `name` attribute. */ name?: string; /** The `tabindex` attribute. */ tabIndex?: number; /** If set to `true`, the user cannot interact with the select. */ disabled?: boolean; /** Additional styles to apply to the select. */ style?: React.CSSProperties; /** The `aria-label` attribute. Use this if the select is not referenced by a label element. */ ["aria-label"]?: string; /** A space separated list of label element IDs. */ ["aria-labelledby"]?: string; /** A space separated list of description element IDs. */ ["aria-describedby"]?: string; } export declare const selectStylePropTypes: { [x: string]: PropTypes.Validator; }; export declare const sharedSelectBasePropTypes: { onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>; onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>; onClick: PropTypes.Requireable<(...args: any[]) => any>; hasOnClick: PropTypes.Requireable; size: PropTypes.Validator; autoFocus: PropTypes.Requireable; disabled: PropTypes.Requireable; id: PropTypes.Requireable; name: PropTypes.Requireable; tabIndex: PropTypes.Requireable; className: PropTypes.Requireable; style: PropTypes.Requireable; "aria-label": PropTypes.Requireable; "aria-labelledby": PropTypes.Requireable; "aria-describedby": PropTypes.Requireable; }; /** * Props shared between the {@link Select} and {@link SelectSynced} components. */ export interface SharedSelectProps extends SharedSelectBaseProps { /** The list of select options. */ options: Array; /** A function to be called when the selected option changes. */ onChange?: (value: SelectOptionValue) => unknown; } export declare const sharedSelectPropTypes: { onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>; onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>; onClick: PropTypes.Requireable<(...args: any[]) => any>; hasOnClick: PropTypes.Requireable; size: PropTypes.Validator; autoFocus: PropTypes.Requireable; disabled: PropTypes.Requireable; id: PropTypes.Requireable; name: PropTypes.Requireable; tabIndex: PropTypes.Requireable; className: PropTypes.Requireable; style: PropTypes.Requireable; "aria-label": PropTypes.Requireable; "aria-labelledby": PropTypes.Requireable; "aria-describedby": PropTypes.Requireable; options: PropTypes.Validator; label: PropTypes.Validator; disabled: PropTypes.Requireable; }>[]>; onChange: PropTypes.Requireable<(...args: any[]) => any>; }; /** * Props for the {@link Select} component. Also accepts: * * {@link SelectStyleProps} * * @docsPath UI/components/Select */ export interface SelectProps extends SharedSelectProps { /** The value of the selected option. */ value: SelectOptionValue; } declare const ForwardedRefSelect: React.ForwardRefExoticComponent>; export default ForwardedRefSelect;