/// import { Simplify } from '@mui/types'; import { FormControlState } from '@mui/base/FormControl'; import { UseNumberInputParameters, UseNumberInputRootSlotProps, UseNumberInputIncrementButtonSlotProps, UseNumberInputDecrementButtonSlotProps } from '@mui/base/unstable_useNumberInput/useNumberInput.types'; import { PolymorphicProps, SlotComponentProps } from '@mui/base/utils'; export interface NumberInputRootSlotPropsOverrides { } export interface NumberInputInputSlotPropsOverrides { } export interface NumberInputStepperButtonSlotPropsOverrides { } export type NumberInputOwnProps = Omit & { /** * Trailing adornment for this input. */ endAdornment?: React.ReactNode; /** * If `true`, the `input` will indicate an error by setting the `aria-invalid` attribute on the input and the `baseui--error` class on the root element. */ error?: boolean; /** * The id of the `input` element. */ id?: string; /** * The short hint displayed in the `input` before the user enters a value. */ placeholder?: React.InputHTMLAttributes['placeholder']; /** * The props used for each slot inside the NumberInput. * @default {} */ slotProps?: { root?: SlotComponentProps<'div', NumberInputRootSlotPropsOverrides, NumberInputOwnerState>; input?: SlotComponentProps<'input', NumberInputInputSlotPropsOverrides, NumberInputOwnerState>; incrementButton?: SlotComponentProps<'button', NumberInputStepperButtonSlotPropsOverrides, NumberInputOwnerState>; decrementButton?: SlotComponentProps<'button', NumberInputStepperButtonSlotPropsOverrides, NumberInputOwnerState>; }; /** * The components used for each slot inside the InputBase. * Either a string to use a HTML element or a component. * @default {} */ slots?: NumberInputSlots; /** * Leading adornment for this input. */ startAdornment?: React.ReactNode; }; export interface NumberInputSlots { /** * The component that renders the root. * @default 'div' */ root?: React.ElementType; /** * The component that renders the input. * @default 'input' */ input?: React.ElementType; /** * The component that renders the increment button. * @default 'button' */ incrementButton?: React.ElementType; /** * The component that renders the decrement button. * @default 'button' */ decrementButton?: React.ElementType; } export interface NumberInputTypeMap { props: AdditionalProps & NumberInputOwnProps; defaultComponent: RootComponentType; } export type NumberInputProps = PolymorphicProps, RootComponentType>; export type NumberInputOwnerState = Simplify; export type NumberInputRootSlotProps = Simplify; }>; export type NumberInputInputSlotProps = Simplify & { id: string | undefined; ownerState: NumberInputOwnerState; placeholder: string | undefined; ref: React.Ref; }>; export type NumberInputIncrementButtonSlotProps = Simplify; export type NumberInputDecrementButtonSlotProps = Simplify;