@mui/material 5.15.17 → 5.15.19
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/AlertTitle/AlertTitle.d.ts +2 -2
- package/Autocomplete/Autocomplete.js +49 -21
- package/CHANGELOG.md +64 -0
- package/Hidden/Hidden.d.ts +2 -0
- package/Hidden/Hidden.js +2 -0
- package/Pagination/Pagination.js +1 -1
- package/Slider/Slider.js +1 -1
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +4 -0
- package/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/index.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +28 -15
- package/legacy/Hidden/Hidden.js +2 -0
- package/legacy/Pagination/Pagination.js +1 -1
- package/legacy/Slider/Slider.js +1 -1
- package/legacy/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/responsiveFontSizes.js +3 -0
- package/modern/Autocomplete/Autocomplete.js +49 -21
- package/modern/Hidden/Hidden.js +2 -0
- package/modern/Pagination/Pagination.js +1 -1
- package/modern/Slider/Slider.js +1 -1
- package/modern/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/responsiveFontSizes.js +3 -0
- package/node/Autocomplete/Autocomplete.js +50 -22
- package/node/Hidden/Hidden.js +2 -0
- package/node/Pagination/Pagination.js +1 -1
- package/node/Slider/Slider.js +1 -1
- package/node/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/responsiveFontSizes.js +3 -0
- package/package.json +4 -4
- package/styles/responsiveFontSizes.js +3 -0
- package/umd/material-ui.development.js +35 -18
- package/umd/material-ui.production.min.js +2 -2
- package/usePagination/usePagination.d.ts +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
|
-
import {
|
|
3
|
+
import { Theme, TypographyProps } from '..';
|
|
4
4
|
import { AlertTitleClasses } from './alertTitleClasses';
|
|
5
5
|
|
|
6
|
-
export interface AlertTitleProps extends
|
|
6
|
+
export interface AlertTitleProps extends TypographyProps<'div'> {
|
|
7
7
|
/**
|
|
8
8
|
* The content of the component.
|
|
9
9
|
*/
|
|
@@ -4,7 +4,9 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
var _ClearIcon, _ArrowDropDownIcon;
|
|
6
6
|
const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionKey", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"],
|
|
7
|
-
_excluded2 = ["ref"]
|
|
7
|
+
_excluded2 = ["ref"],
|
|
8
|
+
_excluded3 = ["key"],
|
|
9
|
+
_excluded4 = ["key"];
|
|
8
10
|
import * as React from 'react';
|
|
9
11
|
import PropTypes from 'prop-types';
|
|
10
12
|
import clsx from 'clsx';
|
|
@@ -30,7 +32,6 @@ import capitalize from '../utils/capitalize';
|
|
|
30
32
|
import useForkRef from '../utils/useForkRef';
|
|
31
33
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
34
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
|
-
import { createElement as _createElement } from "react";
|
|
34
35
|
const useThemeProps = createUseThemeProps('MuiAutocomplete');
|
|
35
36
|
const useUtilityClasses = ownerState => {
|
|
36
37
|
const {
|
|
@@ -91,21 +92,11 @@ const AutocompleteRoot = styled('div', {
|
|
|
91
92
|
}, styles.root, fullWidth && styles.fullWidth, hasPopupIcon && styles.hasPopupIcon, hasClearIcon && styles.hasClearIcon];
|
|
92
93
|
}
|
|
93
94
|
})({
|
|
94
|
-
[`&.${autocompleteClasses.focused} .${autocompleteClasses.clearIndicator}`]: {
|
|
95
|
-
visibility: 'visible'
|
|
96
|
-
},
|
|
97
|
-
/* Avoid double tap issue on iOS */
|
|
98
|
-
'@media (pointer: fine)': {
|
|
99
|
-
[`&:hover .${autocompleteClasses.clearIndicator}`]: {
|
|
100
|
-
visibility: 'visible'
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
95
|
[`& .${autocompleteClasses.tag}`]: {
|
|
104
96
|
margin: 3,
|
|
105
97
|
maxWidth: 'calc(100% - 6px)'
|
|
106
98
|
},
|
|
107
99
|
[`& .${autocompleteClasses.inputRoot}`]: {
|
|
108
|
-
flexWrap: 'wrap',
|
|
109
100
|
[`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
|
|
110
101
|
paddingRight: 26 + 4
|
|
111
102
|
},
|
|
@@ -117,6 +108,23 @@ const AutocompleteRoot = styled('div', {
|
|
|
117
108
|
minWidth: 30
|
|
118
109
|
}
|
|
119
110
|
},
|
|
111
|
+
[`&.${autocompleteClasses.focused}`]: {
|
|
112
|
+
[`& .${autocompleteClasses.clearIndicator}`]: {
|
|
113
|
+
visibility: 'visible'
|
|
114
|
+
},
|
|
115
|
+
[`& .${autocompleteClasses.input}`]: {
|
|
116
|
+
minWidth: 0
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
/* Avoid double tap issue on iOS */
|
|
120
|
+
'@media (pointer: fine)': {
|
|
121
|
+
[`&:hover .${autocompleteClasses.clearIndicator}`]: {
|
|
122
|
+
visibility: 'visible'
|
|
123
|
+
},
|
|
124
|
+
[`&:hover .${autocompleteClasses.input}`]: {
|
|
125
|
+
minWidth: 0
|
|
126
|
+
}
|
|
127
|
+
},
|
|
120
128
|
[`& .${inputClasses.root}`]: {
|
|
121
129
|
paddingBottom: 1,
|
|
122
130
|
'& .MuiInput-input': {
|
|
@@ -223,6 +231,15 @@ const AutocompleteRoot = styled('div', {
|
|
|
223
231
|
opacity: 1
|
|
224
232
|
}
|
|
225
233
|
}
|
|
234
|
+
}, {
|
|
235
|
+
props: {
|
|
236
|
+
multiple: true
|
|
237
|
+
},
|
|
238
|
+
style: {
|
|
239
|
+
[`& .${autocompleteClasses.inputRoot}`]: {
|
|
240
|
+
flexWrap: 'wrap'
|
|
241
|
+
}
|
|
242
|
+
}
|
|
226
243
|
}]
|
|
227
244
|
});
|
|
228
245
|
const AutocompleteEndAdornment = styled('div', {
|
|
@@ -525,12 +542,19 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
525
542
|
if (renderTags) {
|
|
526
543
|
startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
|
|
527
544
|
} else {
|
|
528
|
-
startAdornment = value.map((option, index) =>
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
545
|
+
startAdornment = value.map((option, index) => {
|
|
546
|
+
const _getCustomizedTagProp = getCustomizedTagProps({
|
|
547
|
+
index
|
|
548
|
+
}),
|
|
549
|
+
{
|
|
550
|
+
key
|
|
551
|
+
} = _getCustomizedTagProp,
|
|
552
|
+
customTagProps = _objectWithoutPropertiesLoose(_getCustomizedTagProp, _excluded3);
|
|
553
|
+
return /*#__PURE__*/_jsx(Chip, _extends({
|
|
554
|
+
label: getOptionLabel(option),
|
|
555
|
+
size: size
|
|
556
|
+
}, customTagProps, ChipProps), key);
|
|
557
|
+
});
|
|
534
558
|
}
|
|
535
559
|
}
|
|
536
560
|
if (limitTags > -1 && Array.isArray(startAdornment)) {
|
|
@@ -558,9 +582,13 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
558
582
|
const renderGroup = renderGroupProp || defaultRenderGroup;
|
|
559
583
|
const defaultRenderOption = (props2, option) => {
|
|
560
584
|
// Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
585
|
+
const {
|
|
586
|
+
key
|
|
587
|
+
} = props2,
|
|
588
|
+
otherProps = _objectWithoutPropertiesLoose(props2, _excluded4);
|
|
589
|
+
return /*#__PURE__*/_jsx("li", _extends({}, otherProps, {
|
|
590
|
+
children: getOptionLabel(option)
|
|
591
|
+
}), key);
|
|
564
592
|
};
|
|
565
593
|
const renderOption = renderOptionProp || defaultRenderOption;
|
|
566
594
|
const renderListOption = (option, index) => {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v5.15.19
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.15.18..master -->
|
|
6
|
+
|
|
7
|
+
_May 29, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 12 contributors who made this release possible.
|
|
10
|
+
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
11
|
+
|
|
12
|
+
### `@mui/material@5.15.19`
|
|
13
|
+
|
|
14
|
+
- ​<!-- 19 -->[AlertTitle] Enable extending Typography props (@lucasgmelo) (#42334) @github-actions[bot]
|
|
15
|
+
- ​<!-- 06 -->[responsiveFontSizes] Handled undefined variants (@brijeshb42) (#42419) @github-actions[bot]
|
|
16
|
+
- ​<!-- 05 -->[Slider] Fix wrong CSS value (@mnajdova) (#42373) @github-actions[bot]
|
|
17
|
+
|
|
18
|
+
### Docs
|
|
19
|
+
|
|
20
|
+
- ​<!-- 13 -->Link to pnpm installation docs (#42420) @aarongarciah
|
|
21
|
+
- ​<!-- 12 -->Remove LocalMonero (@oliviertassinari) (#42315) @github-actions[bot]
|
|
22
|
+
- ​<!-- 10 -->[material-ui] Fix typo in style interoperability with Tailwind CSS docs (@ZeeshanTamboli) (#42312) @github-actions[bot]
|
|
23
|
+
- ​<!-- 09 -->[material-ui][Pagination] Clarify pagination `page` prop API (@Mandar-Pandya) (#42265) @github-actions[bot]
|
|
24
|
+
- ​<!-- 08 -->[material-ui][Tabs] Improve the Basic Tabs demo (@MatheusEli) (#42426) @github-actions[bot]
|
|
25
|
+
- ​<!-- 07 -->[pigment-css] Fix duplication of content (#42410) @oliviertassinari
|
|
26
|
+
|
|
27
|
+
### Core
|
|
28
|
+
|
|
29
|
+
- ​<!-- 18 -->[blog] Add the "Product" tag to the Pigment CSS post (@danilo-leal) (#42366) @github-actions[bot]
|
|
30
|
+
- ​<!-- 17 -->[blog] Update blog post OG image (@danilo-leal) (#42306) @github-actions[bot]
|
|
31
|
+
- ​<!-- 16 -->[blog] Update Pigment CSS post (@danilo-leal) (#42267) @github-actions[bot]
|
|
32
|
+
- ​<!-- 15 -->[core] Fix React 18.3 warnings about spreading keys in the Material UI `Autocomplete` component (#42099) (#42241) @DiegoAndai
|
|
33
|
+
- ​<!-- 14 -->[core] Fix a few more key spread issues (@oliviertassinari) (#42318) @github-actions[bot]
|
|
34
|
+
- ​<!-- 11 -->[docs-infra] Allow JSDoc tags (#42327) @aarongarciah
|
|
35
|
+
- ​<!-- 04 -->[website] Add Nikita to the about page (@nikitaa24) (#42421) @github-actions[bot]
|
|
36
|
+
- ​<!-- 03 -->[website] Fix hero spacing changes applying at the wrong breakpoint (@KenanYusuf) (#42357) @github-actions[bot]
|
|
37
|
+
- ​<!-- 02 -->[website] Adds Kenan Yusuf to about page (@KenanYusuf) (#42330) @github-actions[bot]
|
|
38
|
+
- ​<!-- 01 -->[website] Improve about page @oliviertassinari
|
|
39
|
+
|
|
40
|
+
All contributors of this release in alphabetical order: @aarongarciah, @brijeshb42, @danilo-leal, @DiegoAndai, @KenanYusuf, @lucasgmelo, @Mandar-Pandya, @MatheusEli, @mnajdova, @nikitaa24, @oliviertassinari, @ZeeshanTamboli
|
|
41
|
+
|
|
42
|
+
## v5.15.18
|
|
43
|
+
|
|
44
|
+
<!-- generated comparing v5.15.17..master -->
|
|
45
|
+
|
|
46
|
+
_May 14, 2024_
|
|
47
|
+
|
|
48
|
+
A big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
|
|
49
|
+
|
|
50
|
+
### `@mui/material@5.15.18`
|
|
51
|
+
|
|
52
|
+
- ​<!-- 6 -->[Autocomplete] Improve design when there's a start adornment for small autocomplete (@TahaRhidouani) (#42176) @github-actions[bot]
|
|
53
|
+
- ​<!-- 3 -->[ToggleButtonGroup] Add missing `selected` class in ToggleButtonGroupClasses type (@tarunrajput) (#42250) @github-actions[bot]
|
|
54
|
+
|
|
55
|
+
### Docs
|
|
56
|
+
|
|
57
|
+
- ​<!-- 4 -->[docs] Fix 301 to Figma @oliviertassinari
|
|
58
|
+
|
|
59
|
+
### Core
|
|
60
|
+
|
|
61
|
+
- ​<!-- 5 -->[blog] Introducing Pigment CSS blog post (#42198) (#42255) @samuelsycamore
|
|
62
|
+
- ​<!-- 2 -->[website] Add redirection for talk @oliviertassinari
|
|
63
|
+
- ​<!-- 1 -->[website] Adds Arthur Balduini team info (@arthurbalduini) (#42226) @github-actions[bot]
|
|
64
|
+
|
|
65
|
+
All contributors of this release in alphabetical order: @arthurbalduini, @oliviertassinari, @samuelsycamore, @TahaRhidouani, @tarunrajput
|
|
66
|
+
|
|
3
67
|
## v5.15.17
|
|
4
68
|
|
|
5
69
|
<!-- generated comparing v5.15.16..master -->
|
package/Hidden/Hidden.d.ts
CHANGED
|
@@ -90,6 +90,8 @@ export interface HiddenProps {
|
|
|
90
90
|
* API:
|
|
91
91
|
*
|
|
92
92
|
* - [Hidden API](https://mui.com/material-ui/api/hidden/)
|
|
93
|
+
*
|
|
94
|
+
* @deprecated The Hidden component was deprecated in Material UI v5. To learn more, see [the Hidden section](/material-ui/migration/v5-component-changes/#hidden) of the migration docs.
|
|
93
95
|
*/
|
|
94
96
|
declare const Hidden: React.JSXElementConstructor<HiddenProps>;
|
|
95
97
|
|
package/Hidden/Hidden.js
CHANGED
|
@@ -10,6 +10,8 @@ import HiddenCss from './HiddenCss';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Responsively hides children based on the selected implementation.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated The Hidden component was deprecated in Material UI v5. To learn more, see [the Hidden section](/material-ui/migration/v5-component-changes/#hidden) of the migration docs.
|
|
13
15
|
*/
|
|
14
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
17
|
function Hidden(props) {
|
package/Pagination/Pagination.js
CHANGED
|
@@ -193,7 +193,7 @@ process.env.NODE_ENV !== "production" ? Pagination.propTypes /* remove-proptypes
|
|
|
193
193
|
*/
|
|
194
194
|
onChange: PropTypes.func,
|
|
195
195
|
/**
|
|
196
|
-
* The current page.
|
|
196
|
+
* The current page. Unlike `TablePagination`, which starts numbering from `0`, this pagination starts from `1`.
|
|
197
197
|
*/
|
|
198
198
|
page: integerPropType,
|
|
199
199
|
/**
|
package/Slider/Slider.js
CHANGED
|
@@ -337,7 +337,7 @@ export const SliderThumb = styled('span', {
|
|
|
337
337
|
}
|
|
338
338
|
}),
|
|
339
339
|
[`&.${sliderClasses.active}`]: _extends({}, theme.vars ? {
|
|
340
|
-
boxShadow: `0px 0px 0px 14px rgba(${theme.vars.palette[color].mainChannel} / 0.16)
|
|
340
|
+
boxShadow: `0px 0px 0px 14px rgba(${theme.vars.palette[color].mainChannel} / 0.16)`
|
|
341
341
|
} : {
|
|
342
342
|
boxShadow: `0px 0px 0px 14px ${alpha(theme.palette[color].main, 0.16)}`
|
|
343
343
|
})
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface ToggleButtonGroupClasses {
|
|
2
2
|
/** Styles applied to the root element. */
|
|
3
3
|
root: string;
|
|
4
|
+
/** State class applied to the root element if `selected={true}`. */
|
|
5
|
+
selected: string;
|
|
6
|
+
/** Styles applied to the root element if `orientation="horizontal"`. */
|
|
7
|
+
horizontal: string;
|
|
4
8
|
/** Styles applied to the root element if `orientation="vertical"`. */
|
|
5
9
|
vertical: string;
|
|
6
10
|
/** State class applied to the root element if `disabled={true}`. */
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getToggleButtonGroupUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiToggleButtonGroup', slot);
|
|
5
5
|
}
|
|
6
|
-
const toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth', 'firstButton', 'lastButton', 'middleButton']);
|
|
6
|
+
const toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'horizontal', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth', 'firstButton', 'lastButton', 'middleButton']);
|
|
7
7
|
export default toggleButtonGroupClasses;
|
package/index.js
CHANGED
|
@@ -29,7 +29,6 @@ import capitalize from '../utils/capitalize';
|
|
|
29
29
|
import useForkRef from '../utils/useForkRef';
|
|
30
30
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
31
31
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
|
-
import { createElement as _createElement } from "react";
|
|
33
32
|
var useThemeProps = createUseThemeProps('MuiAutocomplete');
|
|
34
33
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
35
34
|
var classes = ownerState.classes,
|
|
@@ -73,22 +72,24 @@ var AutocompleteRoot = styled('div', {
|
|
|
73
72
|
size = ownerState.size;
|
|
74
73
|
return [_defineProperty({}, "& .".concat(autocompleteClasses.tag), styles.tag), _defineProperty({}, "& .".concat(autocompleteClasses.tag), styles["tagSize".concat(capitalize(size))]), _defineProperty({}, "& .".concat(autocompleteClasses.inputRoot), styles.inputRoot), _defineProperty({}, "& .".concat(autocompleteClasses.input), styles.input), _defineProperty({}, "& .".concat(autocompleteClasses.input), inputFocused && styles.inputFocused), styles.root, fullWidth && styles.fullWidth, hasPopupIcon && styles.hasPopupIcon, hasClearIcon && styles.hasClearIcon];
|
|
75
74
|
}
|
|
76
|
-
})((_styled = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_styled, "
|
|
77
|
-
visibility: 'visible'
|
|
78
|
-
}), '@media (pointer: fine)', _defineProperty({}, "&:hover .".concat(autocompleteClasses.clearIndicator), {
|
|
79
|
-
visibility: 'visible'
|
|
80
|
-
})), "& .".concat(autocompleteClasses.tag), {
|
|
75
|
+
})((_styled = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_styled, "& .".concat(autocompleteClasses.tag), {
|
|
81
76
|
margin: 3,
|
|
82
77
|
maxWidth: 'calc(100% - 6px)'
|
|
83
|
-
}), "& .".concat(autocompleteClasses.inputRoot), _defineProperty(_defineProperty(_defineProperty({
|
|
84
|
-
flexWrap: 'wrap'
|
|
85
|
-
}, ".".concat(autocompleteClasses.hasPopupIcon, "&, .").concat(autocompleteClasses.hasClearIcon, "&"), {
|
|
78
|
+
}), "& .".concat(autocompleteClasses.inputRoot), _defineProperty(_defineProperty(_defineProperty({}, ".".concat(autocompleteClasses.hasPopupIcon, "&, .").concat(autocompleteClasses.hasClearIcon, "&"), {
|
|
86
79
|
paddingRight: 26 + 4
|
|
87
80
|
}), ".".concat(autocompleteClasses.hasPopupIcon, ".").concat(autocompleteClasses.hasClearIcon, "&"), {
|
|
88
81
|
paddingRight: 52 + 4
|
|
89
82
|
}), "& .".concat(autocompleteClasses.input), {
|
|
90
83
|
width: 0,
|
|
91
84
|
minWidth: 30
|
|
85
|
+
})), "&.".concat(autocompleteClasses.focused), _defineProperty(_defineProperty({}, "& .".concat(autocompleteClasses.clearIndicator), {
|
|
86
|
+
visibility: 'visible'
|
|
87
|
+
}), "& .".concat(autocompleteClasses.input), {
|
|
88
|
+
minWidth: 0
|
|
89
|
+
})), '@media (pointer: fine)', _defineProperty(_defineProperty({}, "&:hover .".concat(autocompleteClasses.clearIndicator), {
|
|
90
|
+
visibility: 'visible'
|
|
91
|
+
}), "&:hover .".concat(autocompleteClasses.input), {
|
|
92
|
+
minWidth: 0
|
|
92
93
|
})), "& .".concat(inputClasses.root), {
|
|
93
94
|
paddingBottom: 1,
|
|
94
95
|
'& .MuiInput-input': {
|
|
@@ -166,6 +167,13 @@ var AutocompleteRoot = styled('div', {
|
|
|
166
167
|
style: _defineProperty({}, "& .".concat(autocompleteClasses.input), {
|
|
167
168
|
opacity: 1
|
|
168
169
|
})
|
|
170
|
+
}, {
|
|
171
|
+
props: {
|
|
172
|
+
multiple: true
|
|
173
|
+
},
|
|
174
|
+
style: _defineProperty({}, "& .".concat(autocompleteClasses.inputRoot), {
|
|
175
|
+
flexWrap: 'wrap'
|
|
176
|
+
})
|
|
169
177
|
}])));
|
|
170
178
|
var AutocompleteEndAdornment = styled('div', {
|
|
171
179
|
name: 'MuiAutocomplete',
|
|
@@ -527,12 +535,15 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
527
535
|
startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
|
|
528
536
|
} else {
|
|
529
537
|
startAdornment = value.map(function (option, index) {
|
|
538
|
+
var _getCustomizedTagProp = getCustomizedTagProps({
|
|
539
|
+
index: index
|
|
540
|
+
}),
|
|
541
|
+
key = _getCustomizedTagProp.key,
|
|
542
|
+
customTagProps = _objectWithoutProperties(_getCustomizedTagProp, ["key"]);
|
|
530
543
|
return /*#__PURE__*/_jsx(Chip, _extends({
|
|
531
544
|
label: getOptionLabel(option),
|
|
532
545
|
size: size
|
|
533
|
-
},
|
|
534
|
-
index: index
|
|
535
|
-
}), ChipProps));
|
|
546
|
+
}, customTagProps, ChipProps), key);
|
|
536
547
|
});
|
|
537
548
|
}
|
|
538
549
|
}
|
|
@@ -563,9 +574,11 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
563
574
|
var renderGroup = renderGroupProp || defaultRenderGroup;
|
|
564
575
|
var defaultRenderOption = function defaultRenderOption(props2, option) {
|
|
565
576
|
// Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}
|
|
577
|
+
var key = props2.key,
|
|
578
|
+
otherProps = _objectWithoutProperties(props2, ["key"]);
|
|
579
|
+
return /*#__PURE__*/_jsx("li", _extends({}, otherProps, {
|
|
580
|
+
children: getOptionLabel(option)
|
|
581
|
+
}), key);
|
|
569
582
|
};
|
|
570
583
|
var renderOption = renderOptionProp || defaultRenderOption;
|
|
571
584
|
var renderListOption = function renderListOption(option, index) {
|
package/legacy/Hidden/Hidden.js
CHANGED
|
@@ -9,6 +9,8 @@ import HiddenCss from './HiddenCss';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Responsively hides children based on the selected implementation.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated The Hidden component was deprecated in Material UI v5. To learn more, see [the Hidden section](/material-ui/migration/v5-component-changes/#hidden) of the migration docs.
|
|
12
14
|
*/
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
function Hidden(props) {
|
|
@@ -208,7 +208,7 @@ process.env.NODE_ENV !== "production" ? Pagination.propTypes /* remove-proptypes
|
|
|
208
208
|
*/
|
|
209
209
|
onChange: PropTypes.func,
|
|
210
210
|
/**
|
|
211
|
-
* The current page.
|
|
211
|
+
* The current page. Unlike `TablePagination`, which starts numbering from `0`, this pagination starts from `1`.
|
|
212
212
|
*/
|
|
213
213
|
page: integerPropType,
|
|
214
214
|
/**
|
package/legacy/Slider/Slider.js
CHANGED
|
@@ -332,7 +332,7 @@ export var SliderThumb = styled('span', {
|
|
|
332
332
|
boxShadow: 'none'
|
|
333
333
|
}
|
|
334
334
|
})), "&.".concat(sliderClasses.active), _extends({}, theme.vars ? {
|
|
335
|
-
boxShadow: "0px 0px 0px 14px rgba(".concat(theme.vars.palette[color].mainChannel, " / 0.16)
|
|
335
|
+
boxShadow: "0px 0px 0px 14px rgba(".concat(theme.vars.palette[color].mainChannel, " / 0.16)")
|
|
336
336
|
} : {
|
|
337
337
|
boxShadow: "0px 0px 0px 14px ".concat(alpha(theme.palette[color].main, 0.16))
|
|
338
338
|
}))
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getToggleButtonGroupUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiToggleButtonGroup', slot);
|
|
5
5
|
}
|
|
6
|
-
var toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth', 'firstButton', 'lastButton', 'middleButton']);
|
|
6
|
+
var toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'horizontal', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth', 'firstButton', 'lastButton', 'middleButton']);
|
|
7
7
|
export default toggleButtonGroupClasses;
|
package/legacy/index.js
CHANGED
|
@@ -23,6 +23,9 @@ export default function responsiveFontSizes(themeInput) {
|
|
|
23
23
|
});
|
|
24
24
|
variants.forEach(function (variant) {
|
|
25
25
|
var style = typography[variant];
|
|
26
|
+
if (!style) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
26
29
|
var remFontSize = parseFloat(convert(style.fontSize, 'rem'));
|
|
27
30
|
if (remFontSize <= 1) {
|
|
28
31
|
return;
|
|
@@ -4,7 +4,9 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
var _ClearIcon, _ArrowDropDownIcon;
|
|
6
6
|
const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionKey", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"],
|
|
7
|
-
_excluded2 = ["ref"]
|
|
7
|
+
_excluded2 = ["ref"],
|
|
8
|
+
_excluded3 = ["key"],
|
|
9
|
+
_excluded4 = ["key"];
|
|
8
10
|
import * as React from 'react';
|
|
9
11
|
import PropTypes from 'prop-types';
|
|
10
12
|
import clsx from 'clsx';
|
|
@@ -30,7 +32,6 @@ import capitalize from '../utils/capitalize';
|
|
|
30
32
|
import useForkRef from '../utils/useForkRef';
|
|
31
33
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
34
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
|
-
import { createElement as _createElement } from "react";
|
|
34
35
|
const useThemeProps = createUseThemeProps('MuiAutocomplete');
|
|
35
36
|
const useUtilityClasses = ownerState => {
|
|
36
37
|
const {
|
|
@@ -91,21 +92,11 @@ const AutocompleteRoot = styled('div', {
|
|
|
91
92
|
}, styles.root, fullWidth && styles.fullWidth, hasPopupIcon && styles.hasPopupIcon, hasClearIcon && styles.hasClearIcon];
|
|
92
93
|
}
|
|
93
94
|
})({
|
|
94
|
-
[`&.${autocompleteClasses.focused} .${autocompleteClasses.clearIndicator}`]: {
|
|
95
|
-
visibility: 'visible'
|
|
96
|
-
},
|
|
97
|
-
/* Avoid double tap issue on iOS */
|
|
98
|
-
'@media (pointer: fine)': {
|
|
99
|
-
[`&:hover .${autocompleteClasses.clearIndicator}`]: {
|
|
100
|
-
visibility: 'visible'
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
95
|
[`& .${autocompleteClasses.tag}`]: {
|
|
104
96
|
margin: 3,
|
|
105
97
|
maxWidth: 'calc(100% - 6px)'
|
|
106
98
|
},
|
|
107
99
|
[`& .${autocompleteClasses.inputRoot}`]: {
|
|
108
|
-
flexWrap: 'wrap',
|
|
109
100
|
[`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
|
|
110
101
|
paddingRight: 26 + 4
|
|
111
102
|
},
|
|
@@ -117,6 +108,23 @@ const AutocompleteRoot = styled('div', {
|
|
|
117
108
|
minWidth: 30
|
|
118
109
|
}
|
|
119
110
|
},
|
|
111
|
+
[`&.${autocompleteClasses.focused}`]: {
|
|
112
|
+
[`& .${autocompleteClasses.clearIndicator}`]: {
|
|
113
|
+
visibility: 'visible'
|
|
114
|
+
},
|
|
115
|
+
[`& .${autocompleteClasses.input}`]: {
|
|
116
|
+
minWidth: 0
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
/* Avoid double tap issue on iOS */
|
|
120
|
+
'@media (pointer: fine)': {
|
|
121
|
+
[`&:hover .${autocompleteClasses.clearIndicator}`]: {
|
|
122
|
+
visibility: 'visible'
|
|
123
|
+
},
|
|
124
|
+
[`&:hover .${autocompleteClasses.input}`]: {
|
|
125
|
+
minWidth: 0
|
|
126
|
+
}
|
|
127
|
+
},
|
|
120
128
|
[`& .${inputClasses.root}`]: {
|
|
121
129
|
paddingBottom: 1,
|
|
122
130
|
'& .MuiInput-input': {
|
|
@@ -223,6 +231,15 @@ const AutocompleteRoot = styled('div', {
|
|
|
223
231
|
opacity: 1
|
|
224
232
|
}
|
|
225
233
|
}
|
|
234
|
+
}, {
|
|
235
|
+
props: {
|
|
236
|
+
multiple: true
|
|
237
|
+
},
|
|
238
|
+
style: {
|
|
239
|
+
[`& .${autocompleteClasses.inputRoot}`]: {
|
|
240
|
+
flexWrap: 'wrap'
|
|
241
|
+
}
|
|
242
|
+
}
|
|
226
243
|
}]
|
|
227
244
|
});
|
|
228
245
|
const AutocompleteEndAdornment = styled('div', {
|
|
@@ -521,12 +538,19 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
521
538
|
if (renderTags) {
|
|
522
539
|
startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
|
|
523
540
|
} else {
|
|
524
|
-
startAdornment = value.map((option, index) =>
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
541
|
+
startAdornment = value.map((option, index) => {
|
|
542
|
+
const _getCustomizedTagProp = getCustomizedTagProps({
|
|
543
|
+
index
|
|
544
|
+
}),
|
|
545
|
+
{
|
|
546
|
+
key
|
|
547
|
+
} = _getCustomizedTagProp,
|
|
548
|
+
customTagProps = _objectWithoutPropertiesLoose(_getCustomizedTagProp, _excluded3);
|
|
549
|
+
return /*#__PURE__*/_jsx(Chip, _extends({
|
|
550
|
+
label: getOptionLabel(option),
|
|
551
|
+
size: size
|
|
552
|
+
}, customTagProps, ChipProps), key);
|
|
553
|
+
});
|
|
530
554
|
}
|
|
531
555
|
}
|
|
532
556
|
if (limitTags > -1 && Array.isArray(startAdornment)) {
|
|
@@ -554,9 +578,13 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
554
578
|
const renderGroup = renderGroupProp || defaultRenderGroup;
|
|
555
579
|
const defaultRenderOption = (props2, option) => {
|
|
556
580
|
// Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
581
|
+
const {
|
|
582
|
+
key
|
|
583
|
+
} = props2,
|
|
584
|
+
otherProps = _objectWithoutPropertiesLoose(props2, _excluded4);
|
|
585
|
+
return /*#__PURE__*/_jsx("li", _extends({}, otherProps, {
|
|
586
|
+
children: getOptionLabel(option)
|
|
587
|
+
}), key);
|
|
560
588
|
};
|
|
561
589
|
const renderOption = renderOptionProp || defaultRenderOption;
|
|
562
590
|
const renderListOption = (option, index) => {
|
package/modern/Hidden/Hidden.js
CHANGED
|
@@ -10,6 +10,8 @@ import HiddenCss from './HiddenCss';
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Responsively hides children based on the selected implementation.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated The Hidden component was deprecated in Material UI v5. To learn more, see [the Hidden section](/material-ui/migration/v5-component-changes/#hidden) of the migration docs.
|
|
13
15
|
*/
|
|
14
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
17
|
function Hidden(props) {
|
|
@@ -193,7 +193,7 @@ process.env.NODE_ENV !== "production" ? Pagination.propTypes /* remove-proptypes
|
|
|
193
193
|
*/
|
|
194
194
|
onChange: PropTypes.func,
|
|
195
195
|
/**
|
|
196
|
-
* The current page.
|
|
196
|
+
* The current page. Unlike `TablePagination`, which starts numbering from `0`, this pagination starts from `1`.
|
|
197
197
|
*/
|
|
198
198
|
page: integerPropType,
|
|
199
199
|
/**
|
package/modern/Slider/Slider.js
CHANGED
|
@@ -322,7 +322,7 @@ export const SliderThumb = styled('span', {
|
|
|
322
322
|
}
|
|
323
323
|
}),
|
|
324
324
|
[`&.${sliderClasses.active}`]: _extends({}, theme.vars ? {
|
|
325
|
-
boxShadow: `0px 0px 0px 14px rgba(${theme.vars.palette[color].mainChannel} / 0.16)
|
|
325
|
+
boxShadow: `0px 0px 0px 14px rgba(${theme.vars.palette[color].mainChannel} / 0.16)`
|
|
326
326
|
} : {
|
|
327
327
|
boxShadow: `0px 0px 0px 14px ${alpha(theme.palette[color].main, 0.16)}`
|
|
328
328
|
})
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
|
3
3
|
export function getToggleButtonGroupUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiToggleButtonGroup', slot);
|
|
5
5
|
}
|
|
6
|
-
const toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth', 'firstButton', 'lastButton', 'middleButton']);
|
|
6
|
+
const toggleButtonGroupClasses = generateUtilityClasses('MuiToggleButtonGroup', ['root', 'selected', 'horizontal', 'vertical', 'disabled', 'grouped', 'groupedHorizontal', 'groupedVertical', 'fullWidth', 'firstButton', 'lastButton', 'middleButton']);
|
|
7
7
|
export default toggleButtonGroupClasses;
|
package/modern/index.js
CHANGED
|
@@ -18,6 +18,9 @@ export default function responsiveFontSizes(themeInput, options = {}) {
|
|
|
18
18
|
const breakpointValues = breakpoints.map(x => theme.breakpoints.values[x]);
|
|
19
19
|
variants.forEach(variant => {
|
|
20
20
|
const style = typography[variant];
|
|
21
|
+
if (!style) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
21
24
|
const remFontSize = parseFloat(convert(style.fontSize, 'rem'));
|
|
22
25
|
if (remFontSize <= 1) {
|
|
23
26
|
return;
|