import * as React from 'react'; import { OverridableStringUnion, OverridableTypeMap, OverrideProps, OverridableComponent } from '@mui/types'; 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 ButtonSlot = "root" | "startDecorator" | "endDecorator"; interface ButtonPropsVariantOverrides { } interface ButtonPropsColorOverrides { } interface ButtonPropsSizeOverrides { } interface ComponentsProps { root?: SlotComponentProps<"button", { sx?: SxProps; }, ButtonOwnerState>; startDecorator?: SlotComponentProps<"span", { sx?: SxProps; }, ButtonOwnerState>; endDecorator?: SlotComponentProps<"span", { sx?: SxProps; }, ButtonOwnerState>; loadingIndicatorCenter?: SlotComponentProps<"span", { sx?: SxProps; }, ButtonOwnerState>; } interface ButtonTypeMap

{ props: P & { /** * A ref for imperative actions. It currently only supports `focusVisible()` action. */ action?: React.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; /** * Element placed after the children. */ endDecorator?: React.ReactNode; /** * This prop can help identify which element has keyboard focus. * The class name will be applied when the element gains the focus through keyboard interaction. * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo). * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md). * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components * if needed. */ focusVisibleClassName?: string; /** * If `true`, the button will take up the full width of its container. * @default false */ fullWidth?: boolean; /** * The size of the component. */ size?: OverridableStringUnion<"sm" | "md" | "lg", ButtonPropsSizeOverrides>; /** * Element placed before the children. */ startDecorator?: React.ReactNode; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: SxProps; /** * @default 0 */ tabIndex?: NonNullable["tabIndex"]>; /** * The variant to use. * @default 'solid' */ variant?: OverridableStringUnion; /** * If `true`, the loading indicator is shown. * @default false */ loading?: boolean; /** * The node should contain an element with `role="progressbar"` with an accessible name. * By default we render a `CircularProgress` that is labelled by the button itself. * @default */ loadingIndicator?: React.ReactNode; /** * The loading indicator can be positioned on the start, end, or the center of the button. * @default 'center' */ loadingPosition?: "start" | "end" | "center"; }; defaultComponent: D; } interface ExtendButtonTypeMap { props: M["props"] & ButtonTypeMap["props"]; defaultComponent: M["defaultComponent"]; } declare type ButtonProps = OverrideProps, D>; interface ButtonOwnerState extends Omit { color: ButtonProps["color"] | "context"; /** * If `true`, the button's focus is visible. */ focusVisible?: boolean; } declare type ExtendButton = ((props: OverrideProps, "a">) => JSX.Element) & OverridableComponent>; export { ButtonOwnerState, ButtonProps, ButtonPropsColorOverrides, ButtonPropsSizeOverrides, ButtonPropsVariantOverrides, ButtonSlot, ButtonTypeMap, ExtendButton, ExtendButtonTypeMap };