Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/esm/SpeedDial/SpeedDial.d.ts 4.95 KB
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
  import * as React from 'react';
  import { SxProps } from '@mui/system';
  import { Theme } from "../styles/index.js";
  import { InternalStandardProps as StandardProps } from "../internal/index.js";
  import { FabProps } from "../Fab/index.js";
  import { TransitionProps } from "../transitions/index.js";
  import { SpeedDialClasses } from "./speedDialClasses.js";
  import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js";
  export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown';
  export type OpenReason = 'toggle' | 'focus' | 'mouseEnter';
  export interface SpeedDialSlots {
    /**
     * The component that renders the root slot.
     * @default 'div'
     */
    root: React.ElementType;
    /**
     * The component that renders the transition.
     * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
     * @default Zoom
     */
    transition: React.ElementType;
  }
  export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<SpeedDialSlots, {
    /**
     * Props forwarded to the root slot.
     * By default, the available props are based on div element.
     */
    root: SlotComponentProps<'div', React.HTMLAttributes<HTMLDivElement>, SpeedDialOwnerState>;
    /**
     * Props forwarded to the transition slot.
     * By default, the available props are based on the [Zoom](https://mui.com/material-ui/api/zoom/#props) component.
     */
    transition: SlotComponentProps<React.ElementType, TransitionProps, SpeedDialOwnerState>;
  }>;
  export interface SpeedDialProps extends Omit<StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'>, 'slots' | 'slotProps'>, SpeedDialSlotsAndSlotProps {
    /**
     * SpeedDialActions to display when the SpeedDial is `open`.
     */
    children?: React.ReactNode;
    /**
     * Override or extend the styles applied to the component.
     */
    classes?: Partial<SpeedDialClasses>;
    /**
     * The aria-label of the button element.
     * Also used to provide the `id` for the `SpeedDial` element and its children.
     */
    ariaLabel: string;
    /**
     * The direction the actions open relative to the floating action button.
     * @default 'up'
     */
    direction?: 'up' | 'down' | 'left' | 'right';
    /**
     * If `true`, the SpeedDial is hidden.
     * @default false
     */
    hidden?: boolean;
    /**
     * Props applied to the [`Fab`](https://mui.com/material-ui/api/fab/) element.
     * @default {}
     */
    FabProps?: Partial<FabProps>;
    /**
     * The icon to display in the SpeedDial Fab. The `SpeedDialIcon` component
     * provides a default Icon with animation.
     */
    icon?: React.ReactNode;
    /**
     * Callback fired when the component requests to be closed.
     *
     * @param {object} event The event source of the callback.
     * @param {string} reason Can be: `"toggle"`, `"blur"`, `"mouseLeave"`, `"escapeKeyDown"`.
     */
    onClose?: (event: React.SyntheticEvent<{}>, reason: CloseReason) => void;
    /**
     * Callback fired when the component requests to be open.
     *
     * @param {object} event The event source of the callback.
     * @param {string} reason Can be: `"toggle"`, `"focus"`, `"mouseEnter"`.
     */
    onOpen?: (event: React.SyntheticEvent<{}>, reason: OpenReason) => void;
    /**
     * If `true`, the component is shown.
     */
    open?: boolean;
    /**
     * The icon to display in the SpeedDial Fab when the SpeedDial is open.
     */
    openIcon?: React.ReactNode;
    /**
     * The system prop that allows defining system overrides as well as additional CSS styles.
     */
    sx?: SxProps<Theme>;
    /**
     * The component used for the transition.
     * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
     * @default Zoom
     * * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
     */
    TransitionComponent?: React.JSXElementConstructor<TransitionProps>;
    /**
     * The duration for the transition, in milliseconds.
     * You may specify a single timeout for all transitions, or individually with an object.
     * @default {
     *   enter: theme.transitions.duration.enteringScreen,
     *   exit: theme.transitions.duration.leavingScreen,
     * }
     */
    transitionDuration?: TransitionProps['timeout'];
    /**
     * Props applied to the transition element.
     * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
     * @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
     */
    TransitionProps?: TransitionProps;
  }
  export interface SpeedDialOwnerState extends SpeedDialProps {}
  
  /**
   *
   * Demos:
   *
   * - [Speed Dial](https://mui.com/material-ui/react-speed-dial/)
   *
   * API:
   *
   * - [SpeedDial API](https://mui.com/material-ui/api/speed-dial/)
   */
  export default function SpeedDial(props: SpeedDialProps): React.JSX.Element;