@mui/material 5.15.13 → 5.15.15
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/Accordion/Accordion.js +30 -23
- package/AccordionActions/AccordionActions.js +14 -12
- package/AccordionDetails/AccordionDetails.js +2 -2
- package/AccordionSummary/AccordionSummary.js +29 -23
- package/Autocomplete/Autocomplete.d.ts +1 -1
- package/Autocomplete/Autocomplete.js +60 -34
- package/Autocomplete/autocompleteClasses.d.ts +3 -3
- package/CHANGELOG.md +156 -60
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +1 -1
- package/Icon/Icon.d.ts +1 -1
- package/Icon/Icon.js +1 -1
- package/OverridableComponent.d.ts +1 -1
- package/Popper/Popper.d.ts +3 -26
- package/README.md +2 -2
- package/RadioGroup/RadioGroup.d.ts +0 -2
- package/RadioGroup/RadioGroup.js +23 -2
- package/RadioGroup/index.d.ts +3 -0
- package/RadioGroup/index.js +3 -1
- package/RadioGroup/radioGroupClasses.d.ts +6 -0
- package/RadioGroup/radioGroupClasses.js +7 -0
- package/Select/Select.d.ts +8 -20
- package/Slider/Slider.js +404 -223
- package/SvgIcon/SvgIcon.js +1 -1
- package/index.js +1 -1
- package/legacy/Accordion/Accordion.js +33 -22
- package/legacy/AccordionActions/AccordionActions.js +17 -14
- package/legacy/AccordionDetails/AccordionDetails.js +2 -2
- package/legacy/AccordionSummary/AccordionSummary.js +31 -22
- package/legacy/Autocomplete/Autocomplete.js +133 -114
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/Icon/Icon.js +1 -1
- package/legacy/RadioGroup/RadioGroup.js +21 -2
- package/legacy/RadioGroup/index.js +3 -1
- package/legacy/RadioGroup/radioGroupClasses.js +7 -0
- package/legacy/Slider/Slider.js +373 -191
- package/legacy/SvgIcon/SvgIcon.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/experimental_extendTheme.js +1 -1
- package/legacy/styles/rootShouldForwardProp.js +5 -0
- package/legacy/styles/slotShouldForwardProp.js +5 -0
- package/legacy/styles/styled.js +4 -5
- package/legacy/usePagination/usePagination.js +1 -1
- package/modern/Accordion/Accordion.js +30 -23
- package/modern/AccordionActions/AccordionActions.js +14 -12
- package/modern/AccordionDetails/AccordionDetails.js +2 -2
- package/modern/AccordionSummary/AccordionSummary.js +29 -23
- package/modern/Autocomplete/Autocomplete.js +60 -34
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/Icon/Icon.js +1 -1
- package/modern/RadioGroup/RadioGroup.js +23 -2
- package/modern/RadioGroup/index.js +3 -1
- package/modern/RadioGroup/radioGroupClasses.js +7 -0
- package/modern/Slider/Slider.js +337 -172
- package/modern/SvgIcon/SvgIcon.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/experimental_extendTheme.js +1 -1
- package/modern/styles/rootShouldForwardProp.js +3 -0
- package/modern/styles/slotShouldForwardProp.js +5 -0
- package/modern/styles/styled.js +4 -3
- package/modern/usePagination/usePagination.js +1 -1
- package/node/Accordion/Accordion.js +32 -25
- package/node/AccordionActions/AccordionActions.js +16 -14
- package/node/AccordionDetails/AccordionDetails.js +4 -4
- package/node/AccordionSummary/AccordionSummary.js +33 -27
- package/node/Autocomplete/Autocomplete.js +72 -46
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/Icon/Icon.js +1 -1
- package/node/RadioGroup/RadioGroup.js +23 -2
- package/node/RadioGroup/index.js +25 -1
- package/node/RadioGroup/radioGroupClasses.js +15 -0
- package/node/Slider/Slider.js +414 -233
- package/node/SvgIcon/SvgIcon.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/experimental_extendTheme.js +1 -1
- package/node/styles/rootShouldForwardProp.js +10 -0
- package/node/styles/slotShouldForwardProp.js +11 -0
- package/node/styles/styled.js +17 -8
- package/node/usePagination/usePagination.js +1 -1
- package/package.json +6 -6
- package/styles/components.d.ts +5 -0
- package/styles/experimental_extendTheme.js +1 -1
- package/styles/overrides.d.ts +2 -0
- package/styles/rootShouldForwardProp.d.ts +2 -0
- package/styles/rootShouldForwardProp.js +3 -0
- package/styles/slotShouldForwardProp.d.ts +2 -0
- package/styles/slotShouldForwardProp.js +5 -0
- package/styles/styled.d.ts +2 -3
- package/styles/styled.js +4 -3
- package/umd/material-ui.development.js +1010 -746
- package/umd/material-ui.production.min.js +2 -2
- package/usePagination/usePagination.js +1 -1
package/Popper/Popper.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { PopperProps as BasePopperProps } from '@mui/base/Popper';
|
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Theme } from '../styles';
|
|
5
|
-
export
|
|
5
|
+
export interface PopperProps extends Omit<BasePopperProps, 'direction'> {
|
|
6
6
|
/**
|
|
7
7
|
* The component used for the root node.
|
|
8
8
|
* Either a string to use a HTML element or a component.
|
|
@@ -25,7 +25,7 @@ export type PopperProps = Omit<BasePopperProps, 'direction'> & {
|
|
|
25
25
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
26
26
|
*/
|
|
27
27
|
sx?: SxProps<Theme>;
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
/**
|
|
30
30
|
*
|
|
31
31
|
* Demos:
|
|
@@ -38,28 +38,5 @@ export type PopperProps = Omit<BasePopperProps, 'direction'> & {
|
|
|
38
38
|
*
|
|
39
39
|
* - [Popper API](https://mui.com/material-ui/api/popper/)
|
|
40
40
|
*/
|
|
41
|
-
declare const Popper: React.ForwardRefExoticComponent<
|
|
42
|
-
/**
|
|
43
|
-
* The component used for the root node.
|
|
44
|
-
* Either a string to use a HTML element or a component.
|
|
45
|
-
*/
|
|
46
|
-
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* The components used for each slot inside the Popper.
|
|
49
|
-
* Either a string to use a HTML element or a component.
|
|
50
|
-
* @default {}
|
|
51
|
-
*/
|
|
52
|
-
components?: {
|
|
53
|
-
Root?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
54
|
-
} | undefined;
|
|
55
|
-
/**
|
|
56
|
-
* The props used for each slot inside the Popper.
|
|
57
|
-
* @default {}
|
|
58
|
-
*/
|
|
59
|
-
componentsProps?: BasePopperProps['slotProps'];
|
|
60
|
-
/**
|
|
61
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
62
|
-
*/
|
|
63
|
-
sx?: SxProps<Theme> | undefined;
|
|
64
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const Popper: React.ForwardRefExoticComponent<PopperProps & React.RefAttributes<HTMLDivElement>>;
|
|
65
42
|
export default Popper;
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Our documentation features [a collection of example projects using Material UI]
|
|
|
33
33
|
Read the [contributing guide](/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.
|
|
34
34
|
|
|
35
35
|
Contributing to Material UI is about more than just issues and pull requests!
|
|
36
|
-
There are many other ways to [support
|
|
36
|
+
There are many other ways to [support Material UI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.
|
|
37
37
|
|
|
38
38
|
## Changelog
|
|
39
39
|
|
|
@@ -41,7 +41,7 @@ The [changelog](https://github.com/mui/material-ui/releases) is regularly update
|
|
|
41
41
|
|
|
42
42
|
## Roadmap
|
|
43
43
|
|
|
44
|
-
Future plans and high-priority features and enhancements can be found in
|
|
44
|
+
Future plans and high-priority features and enhancements can be found in the [roadmap](https://mui.com/material-ui/discover-more/roadmap/).
|
|
45
45
|
|
|
46
46
|
## License
|
|
47
47
|
|
package/RadioGroup/RadioGroup.js
CHANGED
|
@@ -2,21 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["actions", "children", "defaultValue", "name", "onChange", "value"];
|
|
5
|
+
const _excluded = ["actions", "children", "className", "defaultValue", "name", "onChange", "value"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
10
|
import FormGroup from '../FormGroup';
|
|
11
|
+
import { getRadioGroupUtilityClass } from './radioGroupClasses';
|
|
9
12
|
import useForkRef from '../utils/useForkRef';
|
|
10
13
|
import useControlled from '../utils/useControlled';
|
|
11
14
|
import RadioGroupContext from './RadioGroupContext';
|
|
12
15
|
import useId from '../utils/useId';
|
|
13
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
const useUtilityClasses = props => {
|
|
18
|
+
const {
|
|
19
|
+
classes,
|
|
20
|
+
row,
|
|
21
|
+
error
|
|
22
|
+
} = props;
|
|
23
|
+
const slots = {
|
|
24
|
+
root: ['root', row && 'row', error && 'error']
|
|
25
|
+
};
|
|
26
|
+
return composeClasses(slots, getRadioGroupUtilityClass, classes);
|
|
27
|
+
};
|
|
14
28
|
const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
|
|
15
29
|
const {
|
|
16
30
|
// private
|
|
17
31
|
// eslint-disable-next-line react/prop-types
|
|
18
32
|
actions,
|
|
19
33
|
children,
|
|
34
|
+
className,
|
|
20
35
|
defaultValue,
|
|
21
36
|
name: nameProp,
|
|
22
37
|
onChange,
|
|
@@ -24,6 +39,7 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
|
24
39
|
} = props,
|
|
25
40
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
26
41
|
const rootRef = React.useRef(null);
|
|
42
|
+
const classes = useUtilityClasses(props);
|
|
27
43
|
const [value, setValueState] = useControlled({
|
|
28
44
|
controlled: valueProp,
|
|
29
45
|
default: defaultValue,
|
|
@@ -56,7 +72,8 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
|
56
72
|
value: contextValue,
|
|
57
73
|
children: /*#__PURE__*/_jsx(FormGroup, _extends({
|
|
58
74
|
role: "radiogroup",
|
|
59
|
-
ref: handleRef
|
|
75
|
+
ref: handleRef,
|
|
76
|
+
className: clsx(classes.root, className)
|
|
60
77
|
}, other, {
|
|
61
78
|
children: children
|
|
62
79
|
}))
|
|
@@ -71,6 +88,10 @@ process.env.NODE_ENV !== "production" ? RadioGroup.propTypes /* remove-proptypes
|
|
|
71
88
|
* The content of the component.
|
|
72
89
|
*/
|
|
73
90
|
children: PropTypes.node,
|
|
91
|
+
/**
|
|
92
|
+
* @ignore
|
|
93
|
+
*/
|
|
94
|
+
className: PropTypes.string,
|
|
74
95
|
/**
|
|
75
96
|
* The default value. Use when the component is not controlled.
|
|
76
97
|
*/
|
package/RadioGroup/index.d.ts
CHANGED
package/RadioGroup/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
export { default } from './RadioGroup';
|
|
4
|
-
export { default as useRadioGroup } from './useRadioGroup';
|
|
4
|
+
export { default as useRadioGroup } from './useRadioGroup';
|
|
5
|
+
export { default as radioGroupClasses } from './radioGroupClasses';
|
|
6
|
+
export * from './radioGroupClasses';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormGroupClasses } from '../FormGroup';
|
|
2
|
+
export type RadioGroupClassKey = keyof FormGroupClasses;
|
|
3
|
+
export type RadioGroupClasses = FormGroupClasses;
|
|
4
|
+
export declare function getRadioGroupUtilityClass(slot: string): string;
|
|
5
|
+
declare const radioGroupClasses: RadioGroupClasses;
|
|
6
|
+
export default radioGroupClasses;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
3
|
+
export function getRadioGroupUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiRadioGroup', slot);
|
|
5
|
+
}
|
|
6
|
+
const radioGroupClasses = generateUtilityClasses('MuiRadioGroup', ['root', 'row', 'error']);
|
|
7
|
+
export default radioGroupClasses;
|
package/Select/Select.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ export interface BaseSelectProps<Value = unknown>
|
|
|
148
148
|
* The variant to use.
|
|
149
149
|
* @default 'outlined'
|
|
150
150
|
*/
|
|
151
|
-
variant?:
|
|
151
|
+
variant?: SelectVariants;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
export interface FilledSelectProps extends Omit<FilledInputProps, 'value' | 'onChange'> {
|
|
@@ -172,20 +172,15 @@ export interface OutlinedSelectProps extends Omit<OutlinedInputProps, 'value' |
|
|
|
172
172
|
* The variant to use.
|
|
173
173
|
* @default 'outlined'
|
|
174
174
|
*/
|
|
175
|
-
variant
|
|
175
|
+
variant?: 'outlined';
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
export type SelectVariants = 'outlined' | 'standard' | 'filled';
|
|
179
179
|
|
|
180
|
-
export type SelectProps<
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
(Variant extends 'filled'
|
|
185
|
-
? FilledSelectProps
|
|
186
|
-
: Variant extends 'standard'
|
|
187
|
-
? StandardSelectProps
|
|
188
|
-
: OutlinedSelectProps);
|
|
180
|
+
export type SelectProps<Value = unknown> =
|
|
181
|
+
| (FilledSelectProps & BaseSelectProps<Value>)
|
|
182
|
+
| (StandardSelectProps & BaseSelectProps<Value>)
|
|
183
|
+
| (OutlinedSelectProps & BaseSelectProps<Value>);
|
|
189
184
|
|
|
190
185
|
/**
|
|
191
186
|
*
|
|
@@ -198,15 +193,8 @@ export type SelectProps<
|
|
|
198
193
|
* - [Select API](https://mui.com/material-ui/api/select/)
|
|
199
194
|
* - inherits [OutlinedInput API](https://mui.com/material-ui/api/outlined-input/)
|
|
200
195
|
*/
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
props: {
|
|
204
|
-
/**
|
|
205
|
-
* The variant to use.
|
|
206
|
-
* @default 'outlined'
|
|
207
|
-
*/
|
|
208
|
-
variant?: Variant;
|
|
209
|
-
} & Omit<SelectProps<Value, Variant>, 'variant'>,
|
|
196
|
+
export default function Select<Value = unknown>(
|
|
197
|
+
props: SelectProps<Value>,
|
|
210
198
|
): JSX.Element & {
|
|
211
199
|
muiName: string;
|
|
212
200
|
};
|