import React, { ReactNode } from 'react'; import { DropdownAlign } from "../shared/dropdown"; import { MestCss, MestGenericProps } from "../themes"; import { StyledSelectVariants } from "./style"; export type SelectRef = { focus: () => void; blur: () => void; open: () => void; close: () => void; scrollTo?: (options?: ScrollToOptions) => void; }; type SelectSize = 'tiny' | 'small' | 'medium' | 'large'; type Props = { size?: SelectSize; align?: DropdownAlign; gap?: string; topOffset?: number; disabled?: boolean; value?: string; initialValue?: string; placeholder?: React.ReactNode | string; icon?: React.ComponentType; onChange?: (value: string) => void; pure?: boolean; className?: string; dropdownClassName?: string; dropdownCss?: MestCss; onDropdownVisibleChange?: (visible: boolean) => void; getPopupContainer?: () => HTMLElement | null; closable?: boolean; onClose?: () => void; renderSelected?: (value?: string) => ReactNode; initialVisible?: boolean; } & MestGenericProps; type NativeAttrs = Omit, keyof Props>; export type SelectProps = Props & NativeAttrs & StyledSelectVariants; declare const Select: React.ForwardRefExoticComponent<{ size?: SelectSize | undefined; align?: "left" | "right" | "center" | undefined; gap?: string | undefined; topOffset?: number | undefined; disabled?: boolean | undefined; value?: string | undefined; initialValue?: string | undefined; placeholder?: React.ReactNode | string; icon?: React.ComponentType<{}> | undefined; onChange?: ((value: string) => void) | undefined; pure?: boolean | undefined; className?: string | undefined; dropdownClassName?: string | undefined; dropdownCss?: MestCss | undefined; onDropdownVisibleChange?: ((visible: boolean) => void) | undefined; getPopupContainer?: (() => HTMLElement | null) | undefined; closable?: boolean | undefined; onClose?: (() => void) | undefined; renderSelected?: ((value?: string) => ReactNode) | undefined; initialVisible?: boolean | undefined; } & MestGenericProps & NativeAttrs & import("@stitches/react/types/styled-component").TransformProps<{ border?: boolean | "true" | "false" | undefined; closable?: boolean | "true" | undefined; }, { mobile: "(max-width: 640px)"; tablet: "(min-width: 640px) and (max-width: 920px)"; desktop: "(min-width: 920px)"; xs: "(max-width: 640px)"; sm: "(min-width: 640px) and (max-width: 920px)"; md: "(min-width: 920px) and (max-width: 1280px)"; lg: "(min-width: 1280px) and (max-width: 1920px)"; xl: "(min-width: 1920px)"; xsOrUp: "(max-width: 0px)"; smOrUp: "(min-width: 640px)"; mdOrUp: "(min-width: 920px)"; lgOrUp: "(min-width: 1280px)"; xlOrUp: "(min-width: 1920px)"; }> & { children?: React.ReactNode; } & React.RefAttributes>; export default Select;