import React__default from 'react'; import { OverridableStringUnion, OverrideProps } from '@mui/types'; import { SelectUnstyledCommonProps, SelectOption } from '@mui/base/SelectUnstyled'; export { SelectOption } from '@mui/base/SelectUnstyled'; import { ColorPaletteProp } from '../styles/types/colorSystem.js'; import { VariantProp } from '../styles/types/variants.js'; import { SxProps } from '../styles/types/theme.js'; import '@mui/system'; import '../styles/types/colorScheme.js'; import '../styles/types/focus.js'; import '../styles/types/shadow.js'; import '../styles/types/radius.js'; import '../styles/types/typography.js'; declare type SelectSlot = "root" | "button" | "startDecorator" | "endDecorator" | "indicator" | "listbox"; interface SelectPropsVariantOverrides { } interface SelectPropsColorOverrides { } interface SelectPropsSizeOverrides { } interface ComponentsProps { root?: SlotComponentProps<"div", { sx?: SxProps; }, SelectOwnerState>; button?: SlotComponentProps<"button", { sx?: SxProps; }, SelectOwnerState>; startDecorator?: SlotComponentProps<"span", { sx?: SxProps; }, SelectOwnerState>; endDecorator?: SlotComponentProps<"span", { sx?: SxProps; }, SelectOwnerState>; indicator?: SlotComponentProps<"span", { sx?: SxProps; }, SelectOwnerState>; listbox?: SlotComponentProps<"ul", Omit & { component?: React.ElementType; sx?: SxProps; }, SelectOwnerState>; } interface SelectStaticProps extends SelectUnstyledCommonProps { /** * A ref for imperative actions. It currently only supports `focusVisible()` action. */ action?: React__default.Ref<{ focusVisible(): void; }>; /** * The color of the component. It supports those theme colors that make sense for this component. * @default 'primary' */ color?: OverridableStringUnion; /** * The props used for each slot inside the component. * @default {} */ componentsProps?: ComponentsProps; /** * If `true`, the component is disabled. * @default false */ disabled?: boolean; /** * Trailing adornment for the select. */ endDecorator?: React__default.ReactNode; /** * The indicator(*) for the select. * ________________ * [ value * ] * ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ */ indicator?: React__default.ReactNode; /** * Triggered when focus leaves the menu and the menu should close. */ onClose?: () => void; /** * Text to show when there is no selected value. */ placeholder?: React__default.ReactNode; /** * The size of the component. */ size?: OverridableStringUnion<"sm" | "md" | "lg", SelectPropsSizeOverrides>; /** * Leading adornment for the select. */ startDecorator?: React__default.ReactNode; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: SxProps; /** * The variant to use. * @default 'solid' */ variant?: OverridableStringUnion; } interface SelectOwnProps extends SelectStaticProps { /** * The default selected value. Use when the component is not controlled. */ defaultValue?: TValue | null; /** * A function to convert the currently selected value to a string. * Used to set a value of a hidden input associated with the select, * so that the selected value can be posted with a form. */ getSerializedValue?: (option: SelectOption | null) => React__default.InputHTMLAttributes["value"]; /** * Callback fired when an option is selected. */ onChange?: (e: React__default.MouseEvent | React__default.KeyboardEvent | React__default.FocusEvent | null, value: TValue | null) => void; /** * Function that customizes the rendering of the selected value. */ renderValue?: (option: SelectOption | null) => React__default.ReactNode; /** * The selected value. * Set to `null` to deselect all options. */ value?: TValue | null; } interface SelectOwnerState extends SelectOwnProps { /** * If `true`, the select button is active. */ active: boolean; /** * If `true`, the select button is disabled. */ disabled: boolean; /** * If `true`, the select button's focus is visible. */ focusVisible?: boolean; /** * If `true`, the select dropdown is open. */ open: boolean; } interface SelectTypeMap { props: P & SelectOwnProps; defaultComponent: D; } declare type SelectProps["defaultComponent"]> = OverrideProps, D> & { component?: D; }; export { SelectOwnProps, SelectOwnerState, SelectProps, SelectPropsColorOverrides, SelectPropsSizeOverrides, SelectPropsVariantOverrides, SelectSlot, SelectStaticProps, SelectTypeMap };