@getsoren/design-system 4.57.0 → 4.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +142 -139
- package/dist/main.js +17254 -15543
- package/dist/node_modules/@mui/material/esm/Button/Button.d.ts +132 -0
- package/dist/node_modules/@mui/material/esm/Button/buttonClasses.d.ts +194 -0
- package/dist/node_modules/@mui/material/esm/Button/index.d.ts +4 -0
- package/dist/node_modules/@mui/material/esm/ButtonGroup/ButtonGroupButtonContext.d.ts +6 -0
- package/dist/node_modules/@mui/material/esm/ButtonGroup/ButtonGroupContext.d.ts +18 -0
- package/dist/node_modules/@mui/material/esm/Fab/Fab.d.ts +82 -0
- package/dist/node_modules/@mui/material/esm/Fab/fabClasses.d.ts +26 -0
- package/dist/node_modules/@mui/material/esm/Fab/index.d.ts +4 -0
- package/dist/node_modules/@mui/material/esm/Tooltip/Tooltip.d.ts +230 -0
- package/dist/node_modules/@mui/material/esm/Tooltip/index.d.ts +4 -0
- package/dist/node_modules/@mui/material/esm/Tooltip/tooltipClasses.d.ts +30 -0
- package/dist/src/components/DataDisplay/AiAssistant/AiAssistant.d.ts +15 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantConfirmationCard.d.ts +8 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantEmptyState.d.ts +7 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantFab.d.ts +9 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantHeader.d.ts +4 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantPanel.d.ts +9 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantThinkingOrb.d.ts +9 -0
- package/dist/src/components/DataDisplay/AiAssistant/types.d.ts +56 -0
- package/dist/src/components/DataDisplay/Chat/Chat.d.ts +2 -0
- package/dist/src/components/DataDisplay/Chat/components/ChatMessageInput.d.ts +1 -1
- package/dist/src/components/DataDisplay/Chat/components/ChatVoiceRecorder.d.ts +9 -0
- package/dist/src/components/DataDisplay/Chat/types.d.ts +19 -1
- package/dist/src/components/DataDisplay/Icons/AiSparkIcon.d.ts +7 -0
- package/dist/src/components/DataDisplay/Icons/MicIcon.d.ts +5 -0
- package/dist/src/components/DataDisplay/Logo/Logo.d.ts +1 -1
- package/dist/src/main.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { DistributiveOmit, OverridableStringUnion } from '@mui/types';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
import { Theme } from '../styles/index.js';
|
|
4
|
+
import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase/index.js';
|
|
5
|
+
import { OverrideProps, OverridableComponent, OverridableTypeMap } from '../OverridableComponent/index.js';
|
|
6
|
+
import { ButtonClasses } from './buttonClasses.js';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
export interface ButtonPropsVariantOverrides {}
|
|
9
|
+
export interface ButtonPropsColorOverrides {}
|
|
10
|
+
export interface ButtonPropsSizeOverrides {}
|
|
11
|
+
export interface ButtonOwnProps {
|
|
12
|
+
/**
|
|
13
|
+
* The content of the component.
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Override or extend the styles applied to the component.
|
|
18
|
+
*/
|
|
19
|
+
classes?: Partial<ButtonClasses> | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The color of the component.
|
|
22
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
23
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
24
|
+
* @default 'primary'
|
|
25
|
+
*/
|
|
26
|
+
color?: OverridableStringUnion<'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning', ButtonPropsColorOverrides> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* If `true`, the component is disabled.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, no elevation is used.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
disableElevation?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
disableFocusRipple?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Element placed after the children.
|
|
44
|
+
*/
|
|
45
|
+
endIcon?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* If `true`, the button will take up the full width of its container.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
fullWidth?: boolean | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The URL to link to when the button is clicked.
|
|
53
|
+
* If defined, an `a` element will be used as the root node.
|
|
54
|
+
*/
|
|
55
|
+
href?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* If `true`, the loading indicator is visible and the button is disabled.
|
|
58
|
+
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
59
|
+
* @default null
|
|
60
|
+
*/
|
|
61
|
+
loading?: boolean | null | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Element placed before the children if the button is in loading state.
|
|
64
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
65
|
+
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
66
|
+
* @default <CircularProgress color="inherit" size={16} />
|
|
67
|
+
*/
|
|
68
|
+
loadingIndicator?: React.ReactNode;
|
|
69
|
+
/**
|
|
70
|
+
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
71
|
+
* @default 'center'
|
|
72
|
+
*/
|
|
73
|
+
loadingPosition?: 'start' | 'end' | 'center' | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* The size of the component.
|
|
76
|
+
* `small` is equivalent to the dense button styling.
|
|
77
|
+
* @default 'medium'
|
|
78
|
+
*/
|
|
79
|
+
size?: OverridableStringUnion<'small' | 'medium' | 'large', ButtonPropsSizeOverrides> | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Element placed before the children.
|
|
82
|
+
*/
|
|
83
|
+
startIcon?: React.ReactNode;
|
|
84
|
+
/**
|
|
85
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
86
|
+
*/
|
|
87
|
+
sx?: SxProps<Theme> | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* The variant to use.
|
|
90
|
+
* @default 'text'
|
|
91
|
+
*/
|
|
92
|
+
variant?: OverridableStringUnion<'text' | 'outlined' | 'contained', ButtonPropsVariantOverrides> | undefined;
|
|
93
|
+
}
|
|
94
|
+
export type ButtonTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'button'> = ExtendButtonBaseTypeMap<{
|
|
95
|
+
props: AdditionalProps & ButtonOwnProps;
|
|
96
|
+
defaultComponent: RootComponent;
|
|
97
|
+
}>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* utility to create component types that inherit props from ButtonBase.
|
|
101
|
+
* This component has an additional overload if the `href` prop is set which
|
|
102
|
+
* can make extension quite tricky
|
|
103
|
+
*/
|
|
104
|
+
export interface ExtendButtonTypeMap<TypeMap extends OverridableTypeMap> {
|
|
105
|
+
props: TypeMap['props'] & (TypeMap['props'] extends {
|
|
106
|
+
classes?: Record<string, string> | undefined;
|
|
107
|
+
} ? DistributiveOmit<ButtonTypeMap['props'], 'classes'> : ButtonTypeMap['props']);
|
|
108
|
+
defaultComponent: TypeMap['defaultComponent'];
|
|
109
|
+
}
|
|
110
|
+
export type ExtendButton<TypeMap extends OverridableTypeMap> = ((props: {
|
|
111
|
+
href: string;
|
|
112
|
+
} & OverrideProps<ExtendButtonBaseTypeMap<TypeMap>, 'a'>) => React.JSX.Element) & OverridableComponent<ExtendButtonBaseTypeMap<TypeMap>>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* Demos:
|
|
117
|
+
*
|
|
118
|
+
* - [Button Group](https://v7.mui.com/material-ui/react-button-group/)
|
|
119
|
+
* - [Button](https://v7.mui.com/material-ui/react-button/)
|
|
120
|
+
* - [Menubar](https://v7.mui.com/material-ui/react-menubar/)
|
|
121
|
+
* - [Number Field](https://v7.mui.com/material-ui/react-number-field/)
|
|
122
|
+
*
|
|
123
|
+
* API:
|
|
124
|
+
*
|
|
125
|
+
* - [Button API](https://v7.mui.com/material-ui/api/button/)
|
|
126
|
+
* - inherits [ButtonBase API](https://v7.mui.com/material-ui/api/button-base/)
|
|
127
|
+
*/
|
|
128
|
+
declare const Button: ExtendButtonBase<ButtonTypeMap>;
|
|
129
|
+
export type ButtonProps<RootComponent extends React.ElementType = ButtonTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<ButtonTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
|
130
|
+
component?: React.ElementType | undefined;
|
|
131
|
+
};
|
|
132
|
+
export default Button;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
export interface ButtonClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the root element if `variant="text"`. */
|
|
5
|
+
text: string;
|
|
6
|
+
/** Styles applied to the root element if `variant="text"` and `color="inherit"`.
|
|
7
|
+
* @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) and [.MuiButton-colorInherit](/material-ui/api/button/#button-classes-MuiButton-colorInherit) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
8
|
+
*/
|
|
9
|
+
textInherit: string;
|
|
10
|
+
/** Styles applied to the root element if `variant="text"` and `color="primary"`.
|
|
11
|
+
* @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) and [.MuiButton-colorPrimary](/material-ui/api/button/#button-classes-MuiButton-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
12
|
+
*/
|
|
13
|
+
textPrimary: string;
|
|
14
|
+
/** Styles applied to the root element if `variant="text"` and `color="secondary"`.
|
|
15
|
+
* @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) and [.MuiButton-colorSecondary](/material-ui/api/button/#button-classes-MuiButton-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
16
|
+
*/
|
|
17
|
+
textSecondary: string;
|
|
18
|
+
/** Styles applied to the root element if `variant="text"` and `color="success"`.
|
|
19
|
+
* @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) and [.MuiButton-colorSuccess](/material-ui/api/button/#button-classes-MuiButton-colorSuccess) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
20
|
+
*/
|
|
21
|
+
textSuccess: string;
|
|
22
|
+
/** Styles applied to the root element if `variant="text"` and `color="error"`.
|
|
23
|
+
* @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) and [.MuiButton-colorError](/material-ui/api/button/#button-classes-MuiButton-colorError) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
24
|
+
*/
|
|
25
|
+
textError: string;
|
|
26
|
+
/** Styles applied to the root element if `variant="text"` and `color="info"`.
|
|
27
|
+
* @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) and [.MuiButton-colorInfo](/material-ui/api/button/#button-classes-MuiButton-colorInfo) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
28
|
+
*/
|
|
29
|
+
textInfo: string;
|
|
30
|
+
/** Styles applied to the root element if `variant="text"` and `color="warning"`.
|
|
31
|
+
* @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) and [.MuiButton-colorWarning](/material-ui/api/button/#button-classes-MuiButton-colorWarning) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
32
|
+
*/
|
|
33
|
+
textWarning: string;
|
|
34
|
+
/** Styles applied to the root element if `variant="outlined"`. */
|
|
35
|
+
outlined: string;
|
|
36
|
+
/** Styles applied to the root element if `variant="outlined"` and `color="inherit"`.
|
|
37
|
+
* @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) and [.MuiButton-colorInherit](/material-ui/api/button/#button-classes-MuiButton-colorInherit) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
38
|
+
*/
|
|
39
|
+
outlinedInherit: string;
|
|
40
|
+
/** Styles applied to the root element if `variant="outlined"` and `color="primary"`.
|
|
41
|
+
* @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) and [.MuiButton-colorPrimary](/material-ui/api/button/#button-classes-MuiButton-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
42
|
+
*/
|
|
43
|
+
outlinedPrimary: string;
|
|
44
|
+
/** Styles applied to the root element if `variant="outlined"` and `color="secondary"`.
|
|
45
|
+
* @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) and [.MuiButton-colorSecondary](/material-ui/api/button/#button-classes-MuiButton-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
46
|
+
*/
|
|
47
|
+
outlinedSecondary: string;
|
|
48
|
+
/** Styles applied to the root element if `variant="outlined"` and `color="success"`.
|
|
49
|
+
* @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) and [.MuiButton-colorSuccess](/material-ui/api/button/#button-classes-MuiButton-colorSuccess) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
50
|
+
*/
|
|
51
|
+
outlinedSuccess: string;
|
|
52
|
+
/** Styles applied to the root element if `variant="outlined"` and `color="error"`.
|
|
53
|
+
* @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) and [.MuiButton-colorError](/material-ui/api/button/#button-classes-MuiButton-colorError) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
54
|
+
*/
|
|
55
|
+
outlinedError: string;
|
|
56
|
+
/** Styles applied to the root element if `variant="outlined"` and `color="info"`.
|
|
57
|
+
* @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) and [.MuiButton-colorInfo](/material-ui/api/button/#button-classes-MuiButton-colorInfo) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
58
|
+
*/
|
|
59
|
+
outlinedInfo: string;
|
|
60
|
+
/** Styles applied to the root element if `variant="outlined"` and `color="warning"`.
|
|
61
|
+
* @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) and [.MuiButton-colorWarning](/material-ui/api/button/#button-classes-MuiButton-colorWarning) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
62
|
+
*/
|
|
63
|
+
outlinedWarning: string;
|
|
64
|
+
/** Styles applied to the root element if `variant="contained"`. */
|
|
65
|
+
contained: string;
|
|
66
|
+
/** Styles applied to the root element if `variant="contained"` and `color="inherit"`.
|
|
67
|
+
* @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) and [.MuiButton-colorInherit](/material-ui/api/button/#button-classes-MuiButton-colorInherit) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
68
|
+
*/
|
|
69
|
+
containedInherit: string;
|
|
70
|
+
/** Styles applied to the root element if `variant="contained"` and `color="primary"`.
|
|
71
|
+
* @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) and [.MuiButton-colorPrimary](/material-ui/api/button/#button-classes-MuiButton-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
72
|
+
*/
|
|
73
|
+
containedPrimary: string;
|
|
74
|
+
/** Styles applied to the root element if `variant="contained"` and `color="secondary"`.
|
|
75
|
+
* @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) and [.MuiButton-colorSecondary](/material-ui/api/button/#button-classes-MuiButton-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
76
|
+
*/
|
|
77
|
+
containedSecondary: string;
|
|
78
|
+
/** Styles applied to the root element if `variant="contained"` and `color="success"`.
|
|
79
|
+
* @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) and [.MuiButton-colorSuccess](/material-ui/api/button/#button-classes-MuiButton-colorSuccess) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
80
|
+
*/
|
|
81
|
+
containedSuccess: string;
|
|
82
|
+
/** Styles applied to the root element if `variant="contained"` and `color="info"`.
|
|
83
|
+
* @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) and [.MuiButton-colorInfo](/material-ui/api/button/#button-classes-MuiButton-colorInfo) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
84
|
+
*/
|
|
85
|
+
containedInfo: string;
|
|
86
|
+
/** Styles applied to the root element if `variant="contained"` and `color="error"`.
|
|
87
|
+
* @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) and [.MuiButton-colorError](/material-ui/api/button/#button-classes-MuiButton-colorError) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
88
|
+
*/
|
|
89
|
+
containedError: string;
|
|
90
|
+
/** Styles applied to the root element if `variant="contained"` and `color="warning"`.
|
|
91
|
+
* @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) and [.MuiButton-colorWarning](/material-ui/api/button/#button-classes-MuiButton-colorWarning) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
92
|
+
*/
|
|
93
|
+
containedWarning: string;
|
|
94
|
+
/** Styles applied to the root element if `disableElevation={true}`. */
|
|
95
|
+
disableElevation: string;
|
|
96
|
+
/** State class applied to the ButtonBase root element if the button is keyboard focused. */
|
|
97
|
+
focusVisible: string;
|
|
98
|
+
/** State class applied to the root element if `disabled={true}`. */
|
|
99
|
+
disabled: string;
|
|
100
|
+
/** Styles applied to the root element if `color="inherit"`. */
|
|
101
|
+
colorInherit: string;
|
|
102
|
+
/** Styles applied to the root element if `size="small"` and `variant="text"`.
|
|
103
|
+
* @deprecated Combine the [.MuiButton-sizeSmall](/material-ui/api/button/#button-classes-MuiButton-sizeSmall) and [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
104
|
+
*/
|
|
105
|
+
textSizeSmall: string;
|
|
106
|
+
/** Styles applied to the root element if `size="medium"` and `variant="text"`.
|
|
107
|
+
* @deprecated Combine the [.MuiButton-sizeMedium](/material-ui/api/button/#button-classes-MuiButton-sizeMedium) and [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
108
|
+
*/
|
|
109
|
+
textSizeMedium: string;
|
|
110
|
+
/** Styles applied to the root element if `size="large"` and `variant="text"`.
|
|
111
|
+
* @deprecated Combine the [.MuiButton-sizeLarge](/material-ui/api/button/#button-classes-MuiButton-sizeLarge) and [.MuiButton-text](/material-ui/api/button/#button-classes-MuiButton-text) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
112
|
+
*/
|
|
113
|
+
textSizeLarge: string;
|
|
114
|
+
/** Styles applied to the root element if `size="small"` and `variant="outlined"`.
|
|
115
|
+
* @deprecated Combine the [.MuiButton-sizeSmall](/material-ui/api/button/#button-classes-MuiButton-sizeSmall) and [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
116
|
+
*/
|
|
117
|
+
outlinedSizeSmall: string;
|
|
118
|
+
/** Styles applied to the root element if `size="medium"` and `variant="outlined"`.
|
|
119
|
+
* @deprecated Combine the [.MuiButton-sizeMedium](/material-ui/api/button/#button-classes-MuiButton-sizeMedium) and [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
120
|
+
*/
|
|
121
|
+
outlinedSizeMedium: string;
|
|
122
|
+
/** Styles applied to the root element if `size="large"` and `variant="outlined"`.
|
|
123
|
+
* @deprecated Combine the [.MuiButton-sizeLarge](/material-ui/api/button/#button-classes-MuiButton-sizeLarge) and [.MuiButton-outlined](/material-ui/api/button/#button-classes-MuiButton-outlined) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
124
|
+
*/
|
|
125
|
+
outlinedSizeLarge: string;
|
|
126
|
+
/** Styles applied to the root element if `size="small"` and `variant="contained"`.
|
|
127
|
+
* @deprecated Combine the [.MuiButton-sizeSmall](/material-ui/api/button/#button-classes-MuiButton-sizeSmall) and [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
128
|
+
*/
|
|
129
|
+
containedSizeSmall: string;
|
|
130
|
+
/** Styles applied to the root element if `size="medium"` and `variant="contained"`.
|
|
131
|
+
* @deprecated Combine the [.MuiButton-sizeMedium](/material-ui/api/button/#button-classes-MuiButton-sizeMedium) and [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
132
|
+
*/
|
|
133
|
+
containedSizeMedium: string;
|
|
134
|
+
/** Styles applied to the root element if `size="large"` and `variant="contained"`.
|
|
135
|
+
* @deprecated Combine the [.MuiButton-sizeLarge](/material-ui/api/button/#button-classes-MuiButton-sizeLarge) and [.MuiButton-contained](/material-ui/api/button/#button-classes-MuiButton-contained) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
136
|
+
*/
|
|
137
|
+
containedSizeLarge: string;
|
|
138
|
+
/** Styles applied to the root element if `size="small"`. */
|
|
139
|
+
sizeSmall: string;
|
|
140
|
+
/** Styles applied to the root element if `size="medium"`. */
|
|
141
|
+
sizeMedium: string;
|
|
142
|
+
/** Styles applied to the root element if `size="large"`. */
|
|
143
|
+
sizeLarge: string;
|
|
144
|
+
/** Styles applied to the root element if `fullWidth={true}`. */
|
|
145
|
+
fullWidth: string;
|
|
146
|
+
/** Styles applied to the icon element if supplied */
|
|
147
|
+
icon: string;
|
|
148
|
+
/** Styles applied to the startIcon element if supplied. */
|
|
149
|
+
startIcon: string;
|
|
150
|
+
/** Styles applied to the endIcon element if supplied. */
|
|
151
|
+
endIcon: string;
|
|
152
|
+
/** Styles applied to the icon element if supplied and `size="small"`.
|
|
153
|
+
* @deprecated Combine the [.MuiButton-icon](/material-ui/api/button/#button-classes-MuiButton-icon) and [.MuiButtonSizeSmall](/material-ui/api/button/#button-classes-MuiButton-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
154
|
+
*/
|
|
155
|
+
iconSizeSmall: string;
|
|
156
|
+
/** Styles applied to the icon element if supplied and `size="medium"`.
|
|
157
|
+
* @deprecated Combine the [.MuiButton-icon](/material-ui/api/button/#button-classes-MuiButton-icon) and [.MuiButtonSizeMedium](/material-ui/api/button/#button-classes-MuiButton-sizeMedium) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
158
|
+
*/
|
|
159
|
+
iconSizeMedium: string;
|
|
160
|
+
/** Styles applied to the icon element if supplied and `size="large"`.
|
|
161
|
+
* @deprecated Combine the [.MuiButton-icon](/material-ui/api/button/#button-classes-MuiButton-icon) and [.MuiButtonSizeLarge](/material-ui/api/button/#button-classes-MuiButton-sizeLarge) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
162
|
+
*/
|
|
163
|
+
iconSizeLarge: string;
|
|
164
|
+
/** Styles applied to the root element if `color="primary"`. */
|
|
165
|
+
colorPrimary: string;
|
|
166
|
+
/** Styles applied to the root element if `color="secondary"`. */
|
|
167
|
+
colorSecondary: string;
|
|
168
|
+
/** Styles applied to the root element if `color="success"`. */
|
|
169
|
+
colorSuccess: string;
|
|
170
|
+
/** Styles applied to the root element if `color="error"`. */
|
|
171
|
+
colorError: string;
|
|
172
|
+
/** Styles applied to the root element if `color="info"`. */
|
|
173
|
+
colorInfo: string;
|
|
174
|
+
/** Styles applied to the root element if `color="warning"`. */
|
|
175
|
+
colorWarning: string;
|
|
176
|
+
/** Styles applied to the root element if `loading={true}`. */
|
|
177
|
+
loading: string;
|
|
178
|
+
/** Styles applied to the loadingWrapper element. */
|
|
179
|
+
loadingWrapper: string;
|
|
180
|
+
/** Styles applied to the loadingIconPlaceholder element. */
|
|
181
|
+
loadingIconPlaceholder: string;
|
|
182
|
+
/** Styles applied to the loadingIndicator element. */
|
|
183
|
+
loadingIndicator: string;
|
|
184
|
+
/** Styles applied to the root element if `loadingPosition="center"`. */
|
|
185
|
+
loadingPositionCenter: string;
|
|
186
|
+
/** Styles applied to the root element if `loadingPosition="start"`. */
|
|
187
|
+
loadingPositionStart: string;
|
|
188
|
+
/** Styles applied to the root element if `loadingPosition="end"`. */
|
|
189
|
+
loadingPositionEnd: string;
|
|
190
|
+
}
|
|
191
|
+
export type ButtonClassKey = keyof ButtonClasses;
|
|
192
|
+
export declare function getButtonUtilityClass(slot: string): string;
|
|
193
|
+
declare const buttonClasses: ButtonClasses;
|
|
194
|
+
export default buttonClasses;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ButtonGroupProps } from './ButtonGroup.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface ButtonGroupContextType {
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
color?: ButtonGroupProps['color'] | undefined;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
disableElevation?: boolean | undefined;
|
|
8
|
+
disableFocusRipple?: boolean | undefined;
|
|
9
|
+
disableRipple?: boolean | undefined;
|
|
10
|
+
fullWidth?: boolean | undefined;
|
|
11
|
+
size?: ButtonGroupProps['size'] | undefined;
|
|
12
|
+
variant?: ButtonGroupProps['variant'] | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @ignore - internal component.
|
|
16
|
+
*/
|
|
17
|
+
declare const ButtonGroupContext: React.Context<ButtonGroupContextType>;
|
|
18
|
+
export default ButtonGroupContext;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
import { PropTypes, Theme } from '../styles/index.js';
|
|
4
|
+
import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase/index.js';
|
|
5
|
+
import { OverrideProps } from '../OverridableComponent/index.js';
|
|
6
|
+
import { FabClasses } from './fabClasses.js';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
export interface FabPropsVariantOverrides {}
|
|
9
|
+
export interface FabPropsSizeOverrides {}
|
|
10
|
+
export interface FabPropsColorOverrides {}
|
|
11
|
+
export interface FabOwnProps {
|
|
12
|
+
/**
|
|
13
|
+
* The content of the component.
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Override or extend the styles applied to the component.
|
|
18
|
+
*/
|
|
19
|
+
classes?: Partial<FabClasses> | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The color of the component.
|
|
22
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
23
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
24
|
+
* @default 'default'
|
|
25
|
+
*/
|
|
26
|
+
color?: OverridableStringUnion<PropTypes.Color | 'success' | 'error' | 'info' | 'warning', FabPropsColorOverrides> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* If `true`, the component is disabled.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
disabled?: boolean | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
disableFocusRipple?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* If `true`, the ripple effect is disabled.
|
|
39
|
+
*/
|
|
40
|
+
disableRipple?: boolean | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The URL to link to when the button is clicked.
|
|
43
|
+
* If defined, an `a` element will be used as the root node.
|
|
44
|
+
*/
|
|
45
|
+
href?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The size of the component.
|
|
48
|
+
* `small` is equivalent to the dense button styling.
|
|
49
|
+
* @default 'large'
|
|
50
|
+
*/
|
|
51
|
+
size?: OverridableStringUnion<'small' | 'medium' | 'large', FabPropsSizeOverrides> | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The variant to use.
|
|
54
|
+
* @default 'circular'
|
|
55
|
+
*/
|
|
56
|
+
variant?: OverridableStringUnion<'circular' | 'extended', FabPropsVariantOverrides> | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
59
|
+
*/
|
|
60
|
+
sx?: SxProps<Theme> | undefined;
|
|
61
|
+
}
|
|
62
|
+
export type FabTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'button'> = ExtendButtonBaseTypeMap<{
|
|
63
|
+
props: AdditionalProps & FabOwnProps;
|
|
64
|
+
defaultComponent: RootComponent;
|
|
65
|
+
}>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* Demos:
|
|
70
|
+
*
|
|
71
|
+
* - [Floating Action Button](https://v7.mui.com/material-ui/react-floating-action-button/)
|
|
72
|
+
*
|
|
73
|
+
* API:
|
|
74
|
+
*
|
|
75
|
+
* - [Fab API](https://v7.mui.com/material-ui/api/fab/)
|
|
76
|
+
* - inherits [ButtonBase API](https://v7.mui.com/material-ui/api/button-base/)
|
|
77
|
+
*/
|
|
78
|
+
declare const Fab: ExtendButtonBase<FabTypeMap>;
|
|
79
|
+
export type FabProps<RootComponent extends React.ElementType = FabTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<FabTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
|
80
|
+
component?: React.ElementType | undefined;
|
|
81
|
+
};
|
|
82
|
+
export default Fab;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface FabClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the root element if `color="primary"`. */
|
|
5
|
+
primary: string;
|
|
6
|
+
/** Styles applied to the root element if `color="secondary"`. */
|
|
7
|
+
secondary: string;
|
|
8
|
+
/** Styles applied to the root element if `variant="extended"`. */
|
|
9
|
+
extended: string;
|
|
10
|
+
/** Styles applied to the root element if `variant="circular"`. */
|
|
11
|
+
circular: string;
|
|
12
|
+
/** State class applied to the ButtonBase root element if the button is keyboard focused. */
|
|
13
|
+
focusVisible: string;
|
|
14
|
+
/** State class applied to the root element if `disabled={true}`. */
|
|
15
|
+
disabled: string;
|
|
16
|
+
/** Styles applied to the root element if `color="inherit"`. */
|
|
17
|
+
colorInherit: string;
|
|
18
|
+
/** Styles applied to the root element if `size="small"``. */
|
|
19
|
+
sizeSmall: string;
|
|
20
|
+
/** Styles applied to the root element if `size="medium"``. */
|
|
21
|
+
sizeMedium: string;
|
|
22
|
+
}
|
|
23
|
+
export type FabClassKey = keyof FabClasses;
|
|
24
|
+
export declare function getFabUtilityClass(slot: string): string;
|
|
25
|
+
declare const fabClasses: FabClasses;
|
|
26
|
+
export default fabClasses;
|