@mui/material 6.0.0-alpha.5 → 6.0.0-alpha.7
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.d.ts +2 -2
- package/Accordion/Accordion.js +2 -2
- package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/Alert/Alert.d.ts +2 -2
- package/Alert/Alert.js +2 -2
- package/Alert/alertClasses.d.ts +12 -12
- package/Autocomplete/Autocomplete.d.ts +78 -12
- package/Autocomplete/Autocomplete.js +120 -59
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js +1 -1
- package/Backdrop/Backdrop.d.ts +1 -1
- package/Backdrop/Backdrop.js +1 -1
- package/Badge/Badge.d.ts +2 -2
- package/Badge/Badge.js +2 -2
- package/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
- package/Button/Button.js +1 -1
- package/Button/buttonClasses.d.ts +33 -33
- package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/CHANGELOG.md +95 -0
- package/Checkbox/Checkbox.js +3 -1
- package/Chip/chipClasses.d.ts +28 -26
- package/Chip/chipClasses.js +1 -1
- package/CircularProgress/circularProgressClasses.d.ts +6 -2
- package/Collapse/Collapse.js +66 -35
- package/Dialog/Dialog.js +105 -61
- package/DialogActions/DialogActions.js +16 -12
- package/DialogContent/DialogContent.js +25 -15
- package/DialogContentText/DialogContentText.js +3 -2
- package/DialogTitle/DialogTitle.js +2 -2
- package/Divider/Divider.d.ts +1 -1
- package/Divider/Divider.js +1 -1
- package/Drawer/Drawer.js +73 -32
- package/Fab/Fab.js +1 -1
- package/FilledInput/FilledInput.d.ts +1 -0
- package/FilledInput/FilledInput.js +170 -87
- package/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/FormControlLabel/FormControlLabel.js +1 -1
- package/FormHelperText/FormHelperText.js +2 -2
- package/FormLabel/FormLabel.js +23 -13
- package/Grow/Grow.js +3 -1
- package/Icon/Icon.js +63 -23
- package/ImageList/ImageList.js +2 -2
- package/ImageListItem/ImageListItem.js +2 -2
- package/ImageListItemBar/ImageListItemBar.js +2 -2
- package/Input/Input.d.ts +1 -0
- package/Input/Input.js +84 -61
- package/InputAdornment/InputAdornment.js +37 -21
- package/InputBase/InputBase.js +58 -28
- package/InputLabel/InputLabel.js +120 -58
- package/Link/Link.js +99 -54
- package/Link/getTextDecoration.d.ts +2 -8
- package/Link/getTextDecoration.js +16 -8
- package/List/List.js +22 -13
- package/ListItem/ListItem.js +2 -2
- package/ListItemAvatar/ListItemAvatar.js +2 -2
- package/ListItemButton/ListItemButton.js +3 -2
- package/ListItemIcon/ListItemIcon.js +14 -9
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
- package/ListItemText/ListItemText.js +2 -2
- package/ListSubheader/ListSubheader.js +5 -3
- package/Menu/Menu.js +3 -2
- package/MenuItem/MenuItem.js +47 -27
- package/NativeSelect/NativeSelectInput.js +78 -49
- package/OutlinedInput/NotchedOutline.js +60 -43
- package/OutlinedInput/OutlinedInput.js +97 -39
- package/Pagination/Pagination.js +2 -2
- package/PaginationItem/PaginationItem.d.ts +1 -1
- package/PaginationItem/PaginationItem.js +1 -1
- package/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/Paper/Paper.js +44 -21
- package/Radio/Radio.js +5 -3
- package/Radio/RadioButtonIcon.js +1 -1
- package/Rating/Rating.js +3 -2
- package/Select/Select.js +2 -1
- package/Select/SelectInput.js +8 -6
- package/Skeleton/Skeleton.js +109 -61
- package/Slider/Slider.d.ts +2 -2
- package/Slider/Slider.js +2 -2
- package/Snackbar/Snackbar.js +66 -40
- package/SnackbarContent/SnackbarContent.js +2 -2
- package/SpeedDial/SpeedDial.d.ts +28 -1
- package/SpeedDial/SpeedDial.js +107 -49
- package/SpeedDialAction/SpeedDialAction.js +50 -24
- package/SpeedDialIcon/SpeedDialIcon.js +37 -16
- package/StepConnector/stepConnectorClasses.d.ts +2 -2
- package/StepLabel/StepLabel.d.ts +3 -3
- package/StepLabel/StepLabel.js +3 -3
- package/SwipeableDrawer/SwipeArea.js +39 -18
- package/Tab/Tab.js +127 -55
- package/TabScrollButton/TabScrollButton.js +27 -15
- package/Table/Table.js +2 -2
- package/TableBody/TableBody.js +2 -2
- package/TableCell/TableCell.js +2 -2
- package/TableContainer/TableContainer.js +2 -2
- package/TableFooter/TableFooter.js +2 -2
- package/TableHead/TableHead.js +2 -2
- package/TablePagination/TablePagination.js +2 -2
- package/TableRow/TableRow.js +2 -2
- package/TableSortLabel/TableSortLabel.js +2 -2
- package/Tabs/Tabs.js +107 -54
- package/TextField/TextField.js +2 -2
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +4 -2
- package/Toolbar/Toolbar.js +3 -7
- package/Tooltip/Tooltip.js +185 -88
- package/Typography/Typography.js +89 -39
- package/index.js +1 -1
- package/internal/SwitchBase.js +39 -11
- package/modern/Accordion/Accordion.js +2 -2
- package/modern/Alert/Alert.js +2 -2
- package/modern/Autocomplete/Autocomplete.js +120 -59
- package/modern/Avatar/Avatar.js +1 -1
- package/modern/Backdrop/Backdrop.js +1 -1
- package/modern/Badge/Badge.js +2 -2
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
- package/modern/Button/Button.js +1 -1
- package/modern/Checkbox/Checkbox.js +3 -1
- package/modern/Chip/chipClasses.js +1 -1
- package/modern/Collapse/Collapse.js +66 -35
- package/modern/Dialog/Dialog.js +105 -61
- package/modern/DialogActions/DialogActions.js +16 -12
- package/modern/DialogContent/DialogContent.js +25 -15
- package/modern/DialogContentText/DialogContentText.js +3 -2
- package/modern/DialogTitle/DialogTitle.js +2 -2
- package/modern/Divider/Divider.js +1 -1
- package/modern/Drawer/Drawer.js +73 -32
- package/modern/Fab/Fab.js +1 -1
- package/modern/FilledInput/FilledInput.js +170 -87
- package/modern/FormControlLabel/FormControlLabel.js +1 -1
- package/modern/FormHelperText/FormHelperText.js +2 -2
- package/modern/FormLabel/FormLabel.js +23 -13
- package/modern/Grow/Grow.js +3 -1
- package/modern/Icon/Icon.js +63 -23
- package/modern/ImageList/ImageList.js +2 -2
- package/modern/ImageListItem/ImageListItem.js +2 -2
- package/modern/ImageListItemBar/ImageListItemBar.js +2 -2
- package/modern/Input/Input.js +84 -61
- package/modern/InputAdornment/InputAdornment.js +37 -21
- package/modern/InputBase/InputBase.js +58 -28
- package/modern/InputLabel/InputLabel.js +120 -58
- package/modern/Link/Link.js +99 -54
- package/modern/Link/getTextDecoration.js +16 -8
- package/modern/List/List.js +22 -13
- package/modern/ListItem/ListItem.js +2 -2
- package/modern/ListItemAvatar/ListItemAvatar.js +2 -2
- package/modern/ListItemButton/ListItemButton.js +3 -2
- package/modern/ListItemIcon/ListItemIcon.js +14 -9
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
- package/modern/ListItemText/ListItemText.js +2 -2
- package/modern/ListSubheader/ListSubheader.js +5 -3
- package/modern/Menu/Menu.js +3 -2
- package/modern/MenuItem/MenuItem.js +47 -27
- package/modern/NativeSelect/NativeSelectInput.js +78 -49
- package/modern/OutlinedInput/NotchedOutline.js +60 -43
- package/modern/OutlinedInput/OutlinedInput.js +97 -39
- package/modern/Pagination/Pagination.js +2 -2
- package/modern/PaginationItem/PaginationItem.js +1 -1
- package/modern/Paper/Paper.js +44 -21
- package/modern/Radio/Radio.js +5 -3
- package/modern/Radio/RadioButtonIcon.js +1 -1
- package/modern/Rating/Rating.js +3 -2
- package/modern/Select/Select.js +2 -1
- package/modern/Select/SelectInput.js +8 -6
- package/modern/Skeleton/Skeleton.js +109 -61
- package/modern/Slider/Slider.js +2 -2
- package/modern/Snackbar/Snackbar.js +66 -40
- package/modern/SnackbarContent/SnackbarContent.js +2 -2
- package/modern/SpeedDial/SpeedDial.js +107 -49
- package/modern/SpeedDialAction/SpeedDialAction.js +50 -24
- package/modern/SpeedDialIcon/SpeedDialIcon.js +37 -16
- package/modern/StepLabel/StepLabel.js +3 -3
- package/modern/SwipeableDrawer/SwipeArea.js +39 -18
- package/modern/Tab/Tab.js +127 -55
- package/modern/TabScrollButton/TabScrollButton.js +27 -15
- package/modern/Table/Table.js +2 -2
- package/modern/TableBody/TableBody.js +2 -2
- package/modern/TableCell/TableCell.js +2 -2
- package/modern/TableContainer/TableContainer.js +2 -2
- package/modern/TableFooter/TableFooter.js +2 -2
- package/modern/TableHead/TableHead.js +2 -2
- package/modern/TablePagination/TablePagination.js +2 -2
- package/modern/TableRow/TableRow.js +2 -2
- package/modern/TableSortLabel/TableSortLabel.js +2 -2
- package/modern/Tabs/Tabs.js +107 -54
- package/modern/TextField/TextField.js +2 -2
- package/modern/Toolbar/Toolbar.js +3 -7
- package/modern/Tooltip/Tooltip.js +185 -88
- package/modern/Typography/Typography.js +89 -39
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +39 -11
- package/node/Accordion/Accordion.js +2 -2
- package/node/Alert/Alert.js +2 -2
- package/node/Autocomplete/Autocomplete.js +120 -60
- package/node/Avatar/Avatar.js +1 -1
- package/node/Backdrop/Backdrop.js +1 -1
- package/node/Badge/Badge.js +2 -2
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -3
- package/node/Button/Button.js +2 -2
- package/node/Checkbox/Checkbox.js +3 -1
- package/node/Chip/chipClasses.js +1 -1
- package/node/Collapse/Collapse.js +70 -39
- package/node/Dialog/Dialog.js +110 -66
- package/node/DialogActions/DialogActions.js +18 -14
- package/node/DialogContent/DialogContent.js +27 -17
- package/node/DialogContentText/DialogContentText.js +6 -5
- package/node/DialogTitle/DialogTitle.js +4 -4
- package/node/Divider/Divider.js +1 -1
- package/node/Drawer/Drawer.js +78 -37
- package/node/Fab/Fab.js +2 -2
- package/node/FilledInput/FilledInput.js +176 -91
- package/node/FormControlLabel/FormControlLabel.js +1 -1
- package/node/FormHelperText/FormHelperText.js +4 -4
- package/node/FormLabel/FormLabel.js +26 -16
- package/node/Grow/Grow.js +3 -1
- package/node/Icon/Icon.js +65 -25
- package/node/ImageList/ImageList.js +4 -4
- package/node/ImageListItem/ImageListItem.js +4 -4
- package/node/ImageListItemBar/ImageListItemBar.js +8 -8
- package/node/Input/Input.js +87 -64
- package/node/InputAdornment/InputAdornment.js +39 -23
- package/node/InputBase/InputBase.js +61 -31
- package/node/InputLabel/InputLabel.js +123 -61
- package/node/Link/Link.js +101 -56
- package/node/Link/getTextDecoration.js +18 -10
- package/node/List/List.js +24 -15
- package/node/ListItem/ListItem.js +5 -5
- package/node/ListItemAvatar/ListItemAvatar.js +4 -4
- package/node/ListItemButton/ListItemButton.js +6 -5
- package/node/ListItemIcon/ListItemIcon.js +16 -11
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
- package/node/ListItemText/ListItemText.js +4 -4
- package/node/ListSubheader/ListSubheader.js +7 -5
- package/node/Menu/Menu.js +8 -7
- package/node/MenuItem/MenuItem.js +50 -30
- package/node/NativeSelect/NativeSelectInput.js +80 -53
- package/node/OutlinedInput/NotchedOutline.js +64 -47
- package/node/OutlinedInput/OutlinedInput.js +101 -43
- package/node/Pagination/Pagination.js +5 -5
- package/node/PaginationItem/PaginationItem.js +1 -1
- package/node/Paper/Paper.js +49 -28
- package/node/Radio/Radio.js +6 -4
- package/node/Radio/RadioButtonIcon.js +2 -2
- package/node/Rating/Rating.js +9 -8
- package/node/Select/Select.js +6 -5
- package/node/Select/SelectInput.js +9 -7
- package/node/Skeleton/Skeleton.js +113 -65
- package/node/Slider/Slider.js +2 -2
- package/node/Snackbar/Snackbar.js +68 -42
- package/node/SnackbarContent/SnackbarContent.js +6 -6
- package/node/SpeedDial/SpeedDial.js +111 -53
- package/node/SpeedDialAction/SpeedDialAction.js +54 -28
- package/node/SpeedDialIcon/SpeedDialIcon.js +39 -18
- package/node/StepLabel/StepLabel.js +3 -3
- package/node/SwipeableDrawer/SwipeArea.js +41 -20
- package/node/Tab/Tab.js +129 -57
- package/node/TabScrollButton/TabScrollButton.js +29 -17
- package/node/Table/Table.js +4 -4
- package/node/TableBody/TableBody.js +4 -4
- package/node/TableCell/TableCell.js +4 -4
- package/node/TableContainer/TableContainer.js +4 -4
- package/node/TableFooter/TableFooter.js +4 -4
- package/node/TableHead/TableHead.js +4 -4
- package/node/TablePagination/TablePagination.js +10 -10
- package/node/TableRow/TableRow.js +4 -4
- package/node/TableSortLabel/TableSortLabel.js +5 -5
- package/node/Tabs/Tabs.js +113 -60
- package/node/TextField/TextField.js +4 -4
- package/node/Toolbar/Toolbar.js +5 -9
- package/node/Tooltip/Tooltip.js +189 -92
- package/node/Typography/Typography.js +90 -40
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +41 -13
- package/package.json +6 -6
- package/umd/material-ui.development.js +2705 -1353
- package/umd/material-ui.production.min.js +4 -4
|
@@ -37,11 +37,12 @@ var _ArrowDropDown = _interopRequireDefault(require("../internal/svg-icons/Arrow
|
|
|
37
37
|
var _zeroStyled = require("../zero-styled");
|
|
38
38
|
var _autocompleteClasses = _interopRequireWildcard(require("./autocompleteClasses"));
|
|
39
39
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
40
|
-
var
|
|
40
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
41
41
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
42
42
|
var _ClearIcon, _ArrowDropDownIcon;
|
|
43
|
-
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"],
|
|
44
|
-
_excluded2 = ["ref"]
|
|
43
|
+
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", "slots", "slotProps", "value"],
|
|
44
|
+
_excluded2 = ["ref"],
|
|
45
|
+
_excluded3 = ["key"];
|
|
45
46
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
46
47
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
47
48
|
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiAutocomplete');
|
|
@@ -104,21 +105,11 @@ const AutocompleteRoot = (0, _zeroStyled.styled)('div', {
|
|
|
104
105
|
}, styles.root, fullWidth && styles.fullWidth, hasPopupIcon && styles.hasPopupIcon, hasClearIcon && styles.hasClearIcon];
|
|
105
106
|
}
|
|
106
107
|
})({
|
|
107
|
-
[`&.${_autocompleteClasses.default.focused} .${_autocompleteClasses.default.clearIndicator}`]: {
|
|
108
|
-
visibility: 'visible'
|
|
109
|
-
},
|
|
110
|
-
/* Avoid double tap issue on iOS */
|
|
111
|
-
'@media (pointer: fine)': {
|
|
112
|
-
[`&:hover .${_autocompleteClasses.default.clearIndicator}`]: {
|
|
113
|
-
visibility: 'visible'
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
108
|
[`& .${_autocompleteClasses.default.tag}`]: {
|
|
117
109
|
margin: 3,
|
|
118
110
|
maxWidth: 'calc(100% - 6px)'
|
|
119
111
|
},
|
|
120
112
|
[`& .${_autocompleteClasses.default.inputRoot}`]: {
|
|
121
|
-
flexWrap: 'wrap',
|
|
122
113
|
[`.${_autocompleteClasses.default.hasPopupIcon}&, .${_autocompleteClasses.default.hasClearIcon}&`]: {
|
|
123
114
|
paddingRight: 26 + 4
|
|
124
115
|
},
|
|
@@ -130,6 +121,23 @@ const AutocompleteRoot = (0, _zeroStyled.styled)('div', {
|
|
|
130
121
|
minWidth: 30
|
|
131
122
|
}
|
|
132
123
|
},
|
|
124
|
+
[`&.${_autocompleteClasses.default.focused}`]: {
|
|
125
|
+
[`& .${_autocompleteClasses.default.clearIndicator}`]: {
|
|
126
|
+
visibility: 'visible'
|
|
127
|
+
},
|
|
128
|
+
[`& .${_autocompleteClasses.default.input}`]: {
|
|
129
|
+
minWidth: 0
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
/* Avoid double tap issue on iOS */
|
|
133
|
+
'@media (pointer: fine)': {
|
|
134
|
+
[`&:hover .${_autocompleteClasses.default.clearIndicator}`]: {
|
|
135
|
+
visibility: 'visible'
|
|
136
|
+
},
|
|
137
|
+
[`&:hover .${_autocompleteClasses.default.input}`]: {
|
|
138
|
+
minWidth: 0
|
|
139
|
+
}
|
|
140
|
+
},
|
|
133
141
|
[`& .${_inputClasses.default.root}`]: {
|
|
134
142
|
paddingBottom: 1,
|
|
135
143
|
'& .MuiInput-input': {
|
|
@@ -236,6 +244,15 @@ const AutocompleteRoot = (0, _zeroStyled.styled)('div', {
|
|
|
236
244
|
opacity: 1
|
|
237
245
|
}
|
|
238
246
|
}
|
|
247
|
+
}, {
|
|
248
|
+
props: {
|
|
249
|
+
multiple: true
|
|
250
|
+
},
|
|
251
|
+
style: {
|
|
252
|
+
[`& .${_autocompleteClasses.default.inputRoot}`]: {
|
|
253
|
+
flexWrap: 'wrap'
|
|
254
|
+
}
|
|
255
|
+
}
|
|
239
256
|
}]
|
|
240
257
|
});
|
|
241
258
|
const AutocompleteEndAdornment = (0, _zeroStyled.styled)('div', {
|
|
@@ -409,7 +426,6 @@ const AutocompleteGroupUl = (0, _zeroStyled.styled)('ul', {
|
|
|
409
426
|
}
|
|
410
427
|
});
|
|
411
428
|
const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {
|
|
412
|
-
var _slotProps$clearIndic, _slotProps$paper, _slotProps$popper, _slotProps$popupIndic;
|
|
413
429
|
const props = useThemeProps({
|
|
414
430
|
props: inProps,
|
|
415
431
|
name: 'MuiAutocomplete'
|
|
@@ -421,7 +437,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
421
437
|
autoHighlight = false,
|
|
422
438
|
autoSelect = false,
|
|
423
439
|
blurOnSelect = false,
|
|
424
|
-
ChipProps,
|
|
440
|
+
ChipProps: ChipPropsProp,
|
|
425
441
|
className,
|
|
426
442
|
clearIcon = _ClearIcon || (_ClearIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Close.default, {
|
|
427
443
|
fontSize: "small"
|
|
@@ -430,7 +446,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
430
446
|
clearOnEscape = false,
|
|
431
447
|
clearText = 'Clear',
|
|
432
448
|
closeText = 'Close',
|
|
433
|
-
componentsProps
|
|
449
|
+
componentsProps,
|
|
434
450
|
defaultValue = props.multiple ? [] : null,
|
|
435
451
|
disableClearable = false,
|
|
436
452
|
disableCloseOnSelect = false,
|
|
@@ -448,16 +464,16 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
448
464
|
handleHomeEndKeys = !props.freeSolo,
|
|
449
465
|
includeInputInList = false,
|
|
450
466
|
limitTags = -1,
|
|
451
|
-
ListboxComponent
|
|
452
|
-
ListboxProps,
|
|
467
|
+
ListboxComponent: ListboxComponentProp,
|
|
468
|
+
ListboxProps: ListboxPropsProp,
|
|
453
469
|
loading = false,
|
|
454
470
|
loadingText = 'Loading…',
|
|
455
471
|
multiple = false,
|
|
456
472
|
noOptionsText = 'No options',
|
|
457
473
|
openOnFocus = false,
|
|
458
474
|
openText = 'Open',
|
|
459
|
-
PaperComponent
|
|
460
|
-
PopperComponent
|
|
475
|
+
PaperComponent: PaperComponentProp,
|
|
476
|
+
PopperComponent: PopperComponentProp,
|
|
461
477
|
popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowDropDown.default, {})),
|
|
462
478
|
readOnly = false,
|
|
463
479
|
renderGroup: renderGroupProp,
|
|
@@ -466,6 +482,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
466
482
|
renderTags,
|
|
467
483
|
selectOnFocus = !props.freeSolo,
|
|
468
484
|
size = 'medium',
|
|
485
|
+
slots = {},
|
|
469
486
|
slotProps = {}
|
|
470
487
|
} = props,
|
|
471
488
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
@@ -499,15 +516,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
499
516
|
const {
|
|
500
517
|
onMouseDown: handleInputMouseDown
|
|
501
518
|
} = getInputProps();
|
|
502
|
-
const {
|
|
503
|
-
ref: externalListboxRef
|
|
504
|
-
} = ListboxProps != null ? ListboxProps : {};
|
|
505
519
|
const _getListboxProps = getListboxProps(),
|
|
506
520
|
{
|
|
507
521
|
ref: listboxRef
|
|
508
522
|
} = _getListboxProps,
|
|
509
523
|
otherListboxProps = (0, _objectWithoutPropertiesLoose2.default)(_getListboxProps, _excluded2);
|
|
510
|
-
const combinedListboxRef = (0, _useForkRef.default)(listboxRef, externalListboxRef);
|
|
511
524
|
const defaultGetOptionLabel = option => {
|
|
512
525
|
var _option$label;
|
|
513
526
|
return (_option$label = option.label) != null ? _option$label : option;
|
|
@@ -528,6 +541,46 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
528
541
|
size
|
|
529
542
|
});
|
|
530
543
|
const classes = useUtilityClasses(ownerState);
|
|
544
|
+
const externalForwardedProps = {
|
|
545
|
+
slots: (0, _extends2.default)({
|
|
546
|
+
listbox: ListboxComponentProp,
|
|
547
|
+
paper: PaperComponentProp,
|
|
548
|
+
popper: PopperComponentProp
|
|
549
|
+
}, slots),
|
|
550
|
+
slotProps: (0, _extends2.default)({
|
|
551
|
+
chip: ChipPropsProp,
|
|
552
|
+
listbox: ListboxPropsProp
|
|
553
|
+
}, componentsProps, slotProps)
|
|
554
|
+
};
|
|
555
|
+
const [ListboxSlot, listboxProps] = (0, _useSlot.default)('listbox', {
|
|
556
|
+
elementType: 'ul',
|
|
557
|
+
externalForwardedProps,
|
|
558
|
+
ownerState,
|
|
559
|
+
className: classes.listbox,
|
|
560
|
+
additionalProps: otherListboxProps,
|
|
561
|
+
ref: listboxRef
|
|
562
|
+
});
|
|
563
|
+
const [PaperSlot, paperProps] = (0, _useSlot.default)('paper', {
|
|
564
|
+
elementType: _Paper.default,
|
|
565
|
+
externalForwardedProps,
|
|
566
|
+
ownerState,
|
|
567
|
+
className: classes.paper
|
|
568
|
+
});
|
|
569
|
+
const [PopperSlot, popperProps] = (0, _useSlot.default)('popper', {
|
|
570
|
+
elementType: _Popper.default,
|
|
571
|
+
externalForwardedProps,
|
|
572
|
+
ownerState,
|
|
573
|
+
className: classes.popper,
|
|
574
|
+
additionalProps: {
|
|
575
|
+
disablePortal,
|
|
576
|
+
style: {
|
|
577
|
+
width: anchorEl ? anchorEl.clientWidth : null
|
|
578
|
+
},
|
|
579
|
+
role: 'presentation',
|
|
580
|
+
anchorEl,
|
|
581
|
+
open: popupOpen
|
|
582
|
+
}
|
|
583
|
+
});
|
|
531
584
|
let startAdornment;
|
|
532
585
|
if (multiple && value.length > 0) {
|
|
533
586
|
const getCustomizedTagProps = params => (0, _extends2.default)({
|
|
@@ -537,12 +590,19 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
537
590
|
if (renderTags) {
|
|
538
591
|
startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
|
|
539
592
|
} else {
|
|
540
|
-
startAdornment = value.map((option, index) =>
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
593
|
+
startAdornment = value.map((option, index) => {
|
|
594
|
+
const _getCustomizedTagProp = getCustomizedTagProps({
|
|
595
|
+
index
|
|
596
|
+
}),
|
|
597
|
+
{
|
|
598
|
+
key
|
|
599
|
+
} = _getCustomizedTagProp,
|
|
600
|
+
customTagProps = (0, _objectWithoutPropertiesLoose2.default)(_getCustomizedTagProp, _excluded3);
|
|
601
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({
|
|
602
|
+
label: getOptionLabel(option),
|
|
603
|
+
size: size
|
|
604
|
+
}, customTagProps, externalForwardedProps.slotProps.chip), key);
|
|
605
|
+
});
|
|
546
606
|
}
|
|
547
607
|
}
|
|
548
608
|
if (limitTags > -1 && Array.isArray(startAdornment)) {
|
|
@@ -588,38 +648,22 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
588
648
|
inputValue
|
|
589
649
|
}, ownerState);
|
|
590
650
|
};
|
|
591
|
-
const clearIndicatorSlotProps =
|
|
592
|
-
const
|
|
593
|
-
const popperSlotProps = (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper;
|
|
594
|
-
const popupIndicatorSlotProps = (_slotProps$popupIndic = slotProps.popupIndicator) != null ? _slotProps$popupIndic : componentsProps.popupIndicator;
|
|
651
|
+
const clearIndicatorSlotProps = externalForwardedProps.slotProps.clearIndicator;
|
|
652
|
+
const popupIndicatorSlotProps = externalForwardedProps.slotProps.popupIndicator;
|
|
595
653
|
const renderAutocompletePopperChildren = children => /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePopper, (0, _extends2.default)({
|
|
596
|
-
as:
|
|
597
|
-
|
|
598
|
-
style: {
|
|
599
|
-
width: anchorEl ? anchorEl.clientWidth : null
|
|
600
|
-
},
|
|
601
|
-
ownerState: ownerState,
|
|
602
|
-
role: "presentation",
|
|
603
|
-
anchorEl: anchorEl,
|
|
604
|
-
open: popupOpen
|
|
605
|
-
}, popperSlotProps, {
|
|
606
|
-
className: (0, _clsx.default)(classes.popper, popperSlotProps == null ? void 0 : popperSlotProps.className),
|
|
654
|
+
as: PopperSlot
|
|
655
|
+
}, popperProps, {
|
|
607
656
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePaper, (0, _extends2.default)({
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
}, paperSlotProps, {
|
|
611
|
-
className: (0, _clsx.default)(classes.paper, paperSlotProps == null ? void 0 : paperSlotProps.className),
|
|
657
|
+
as: PaperSlot
|
|
658
|
+
}, paperProps, {
|
|
612
659
|
children: children
|
|
613
660
|
}))
|
|
614
661
|
}));
|
|
615
662
|
let autocompletePopper = null;
|
|
616
663
|
if (groupedOptions.length > 0) {
|
|
617
664
|
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteListbox, (0, _extends2.default)({
|
|
618
|
-
as:
|
|
619
|
-
|
|
620
|
-
ownerState: ownerState
|
|
621
|
-
}, otherListboxProps, ListboxProps, {
|
|
622
|
-
ref: combinedListboxRef,
|
|
665
|
+
as: ListboxSlot
|
|
666
|
+
}, listboxProps, {
|
|
623
667
|
children: groupedOptions.map((option, index) => {
|
|
624
668
|
if (groupBy) {
|
|
625
669
|
return renderGroup({
|
|
@@ -740,6 +784,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
740
784
|
blurOnSelect: _propTypes.default.oneOfType([_propTypes.default.oneOf(['mouse', 'touch']), _propTypes.default.bool]),
|
|
741
785
|
/**
|
|
742
786
|
* Props applied to the [`Chip`](/material-ui/api/chip/) element.
|
|
787
|
+
* @deprecated Use `slotProps.chip` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
743
788
|
*/
|
|
744
789
|
ChipProps: _propTypes.default.object,
|
|
745
790
|
/**
|
|
@@ -784,7 +829,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
784
829
|
closeText: _propTypes.default.string,
|
|
785
830
|
/**
|
|
786
831
|
* The props used for each slot inside.
|
|
787
|
-
* @
|
|
832
|
+
* @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
788
833
|
*/
|
|
789
834
|
componentsProps: _propTypes.default.shape({
|
|
790
835
|
clearIndicator: _propTypes.default.object,
|
|
@@ -942,10 +987,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
942
987
|
/**
|
|
943
988
|
* The component used to render the listbox.
|
|
944
989
|
* @default 'ul'
|
|
990
|
+
* @deprecated Use `slots.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
945
991
|
*/
|
|
946
992
|
ListboxComponent: _propTypes.default.elementType,
|
|
947
993
|
/**
|
|
948
994
|
* Props applied to the Listbox element.
|
|
995
|
+
* @deprecated Use `slotProps.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
949
996
|
*/
|
|
950
997
|
ListboxProps: _propTypes.default.object,
|
|
951
998
|
/**
|
|
@@ -1040,11 +1087,13 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1040
1087
|
/**
|
|
1041
1088
|
* The component used to render the body of the popup.
|
|
1042
1089
|
* @default Paper
|
|
1090
|
+
* @deprecated Use `slots.paper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
1043
1091
|
*/
|
|
1044
1092
|
PaperComponent: _propTypes.default.elementType,
|
|
1045
1093
|
/**
|
|
1046
1094
|
* The component used to position the popup.
|
|
1047
1095
|
* @default Popper
|
|
1096
|
+
* @deprecated Use `slots.popper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
1048
1097
|
*/
|
|
1049
1098
|
PopperComponent: _propTypes.default.elementType,
|
|
1050
1099
|
/**
|
|
@@ -1105,11 +1154,22 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1105
1154
|
* The props used for each slot inside.
|
|
1106
1155
|
* @default {}
|
|
1107
1156
|
*/
|
|
1108
|
-
slotProps: _propTypes.default
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1157
|
+
slotProps: _propTypes.default /* @typescript-to-proptypes-ignore */.shape({
|
|
1158
|
+
chip: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1159
|
+
clearIndicator: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1160
|
+
listbox: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1161
|
+
paper: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1162
|
+
popper: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
1163
|
+
popupIndicator: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
1164
|
+
}),
|
|
1165
|
+
/**
|
|
1166
|
+
* The components used for each slot inside.
|
|
1167
|
+
* @default {}
|
|
1168
|
+
*/
|
|
1169
|
+
slots: _propTypes.default.shape({
|
|
1170
|
+
listbox: _propTypes.default.elementType,
|
|
1171
|
+
paper: _propTypes.default.elementType,
|
|
1172
|
+
popper: _propTypes.default.elementType
|
|
1113
1173
|
}),
|
|
1114
1174
|
/**
|
|
1115
1175
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
package/node/Avatar/Avatar.js
CHANGED
|
@@ -254,7 +254,7 @@ process.env.NODE_ENV !== "production" ? Avatar.propTypes /* remove-proptypes */
|
|
|
254
254
|
/**
|
|
255
255
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
256
256
|
* It can be used to listen for the loading error event.
|
|
257
|
-
* @deprecated Use `slotProps.img` instead. This prop will be removed in v7. [
|
|
257
|
+
* @deprecated Use `slotProps.img` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
258
258
|
*/
|
|
259
259
|
imgProps: _propTypes.default.object,
|
|
260
260
|
/**
|
|
@@ -197,7 +197,7 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes /* remove-proptypes *
|
|
|
197
197
|
* The component used for the transition.
|
|
198
198
|
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
199
199
|
* @default Fade
|
|
200
|
-
* @deprecated Use `slots.transition` instead. This prop will be removed in v7. [
|
|
200
|
+
* @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
201
201
|
*/
|
|
202
202
|
TransitionComponent: _propTypes.default.elementType,
|
|
203
203
|
/**
|
package/node/Badge/Badge.js
CHANGED
|
@@ -366,7 +366,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
|
|
|
366
366
|
/**
|
|
367
367
|
* The components used for each slot inside.
|
|
368
368
|
*
|
|
369
|
-
* @deprecated use the `slots` prop instead. This prop will be removed in v7. [
|
|
369
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
370
370
|
*
|
|
371
371
|
* @default {}
|
|
372
372
|
*/
|
|
@@ -378,7 +378,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
|
|
|
378
378
|
* The extra props for the slot components.
|
|
379
379
|
* You can override the existing props or add new ones.
|
|
380
380
|
*
|
|
381
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [
|
|
381
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
382
382
|
*
|
|
383
383
|
* @default {}
|
|
384
384
|
*/
|
|
@@ -11,14 +11,14 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
14
|
-
var
|
|
14
|
+
var _zeroStyled = require("../zero-styled");
|
|
15
15
|
var _MoreHoriz = _interopRequireDefault(require("../internal/svg-icons/MoreHoriz"));
|
|
16
16
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
const _excluded = ["slots", "slotProps"];
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
-
const BreadcrumbCollapsedButton = (0,
|
|
21
|
+
const BreadcrumbCollapsedButton = (0, _zeroStyled.styled)(_ButtonBase.default)(({
|
|
22
22
|
theme
|
|
23
23
|
}) => (0, _extends2.default)({
|
|
24
24
|
display: 'flex',
|
|
@@ -45,7 +45,7 @@ const BreadcrumbCollapsedButton = (0, _styled.default)(_ButtonBase.default)(({
|
|
|
45
45
|
backgroundColor: (0, _colorManipulator.emphasize)(theme.palette.grey[600], 0.12)
|
|
46
46
|
})
|
|
47
47
|
}));
|
|
48
|
-
const BreadcrumbCollapsedIcon = (0,
|
|
48
|
+
const BreadcrumbCollapsedIcon = (0, _zeroStyled.styled)(_MoreHoriz.default)({
|
|
49
49
|
width: 24,
|
|
50
50
|
height: 16
|
|
51
51
|
});
|
package/node/Button/Button.js
CHANGED
|
@@ -14,7 +14,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
14
14
|
var _resolveProps = _interopRequireDefault(require("@mui/utils/resolveProps"));
|
|
15
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
16
|
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
17
|
-
var
|
|
17
|
+
var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
|
|
18
18
|
var _zeroStyled = require("../zero-styled");
|
|
19
19
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
20
20
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
@@ -73,7 +73,7 @@ const commonIconStyles = [{
|
|
|
73
73
|
}
|
|
74
74
|
}];
|
|
75
75
|
const ButtonRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
76
|
-
shouldForwardProp: prop => (0,
|
|
76
|
+
shouldForwardProp: prop => (0, _rootShouldForwardProp.default)(prop) || prop === 'classes',
|
|
77
77
|
name: 'MuiButton',
|
|
78
78
|
slot: 'Root',
|
|
79
79
|
overridesResolver: (props, styles) => {
|
|
@@ -23,7 +23,7 @@ var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShoul
|
|
|
23
23
|
var _checkboxClasses = _interopRequireWildcard(require("./checkboxClasses"));
|
|
24
24
|
var _zeroStyled = require("../zero-styled");
|
|
25
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
|
-
const _excluded = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"];
|
|
26
|
+
const _excluded = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "disableRipple", "className"];
|
|
27
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
28
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
29
29
|
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiCheckbox');
|
|
@@ -118,12 +118,14 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {
|
|
|
118
118
|
indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,
|
|
119
119
|
inputProps,
|
|
120
120
|
size = 'medium',
|
|
121
|
+
disableRipple = false,
|
|
121
122
|
className
|
|
122
123
|
} = props,
|
|
123
124
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
124
125
|
const icon = indeterminate ? indeterminateIconProp : iconProp;
|
|
125
126
|
const indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;
|
|
126
127
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
128
|
+
disableRipple,
|
|
127
129
|
color,
|
|
128
130
|
indeterminate,
|
|
129
131
|
size
|
package/node/Chip/chipClasses.js
CHANGED
|
@@ -11,5 +11,5 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
|
|
|
11
11
|
function getChipUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiChip', slot);
|
|
13
13
|
}
|
|
14
|
-
const chipClasses = (0, _generateUtilityClasses.default)('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
|
|
14
|
+
const chipClasses = (0, _generateUtilityClasses.default)('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorDefault', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
|
|
15
15
|
var _default = exports.default = chipClasses;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -15,8 +15,7 @@ var _reactTransitionGroup = require("react-transition-group");
|
|
|
15
15
|
var _useTimeout = _interopRequireDefault(require("@mui/utils/useTimeout"));
|
|
16
16
|
var _elementTypeAcceptingRef = _interopRequireDefault(require("@mui/utils/elementTypeAcceptingRef"));
|
|
17
17
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
18
|
-
var
|
|
19
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
18
|
+
var _zeroStyled = require("../zero-styled");
|
|
20
19
|
var _createTransitions = require("../styles/createTransitions");
|
|
21
20
|
var _utils = require("../transitions/utils");
|
|
22
21
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
@@ -26,6 +25,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
26
25
|
const _excluded = ["addEndListener", "children", "className", "collapsedSize", "component", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "orientation", "style", "timeout", "TransitionComponent"];
|
|
27
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
28
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiCollapse');
|
|
29
29
|
const useUtilityClasses = ownerState => {
|
|
30
30
|
const {
|
|
31
31
|
orientation,
|
|
@@ -40,7 +40,7 @@ const useUtilityClasses = ownerState => {
|
|
|
40
40
|
};
|
|
41
41
|
return (0, _composeClasses.default)(slots, _collapseClasses.getCollapseUtilityClass, classes);
|
|
42
42
|
};
|
|
43
|
-
const CollapseRoot = (0,
|
|
43
|
+
const CollapseRoot = (0, _zeroStyled.styled)('div', {
|
|
44
44
|
name: 'MuiCollapse',
|
|
45
45
|
slot: 'Root',
|
|
46
46
|
overridesResolver: (props, styles) => {
|
|
@@ -50,50 +50,79 @@ const CollapseRoot = (0, _styled.default)('div', {
|
|
|
50
50
|
return [styles.root, styles[ownerState.orientation], ownerState.state === 'entered' && styles.entered, ownerState.state === 'exited' && !ownerState.in && ownerState.collapsedSize === '0px' && styles.hidden];
|
|
51
51
|
}
|
|
52
52
|
})(({
|
|
53
|
-
theme
|
|
54
|
-
|
|
55
|
-
}) => (0, _extends2.default)({
|
|
53
|
+
theme
|
|
54
|
+
}) => ({
|
|
56
55
|
height: 0,
|
|
57
56
|
overflow: 'hidden',
|
|
58
|
-
transition: theme.transitions.create('height')
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
57
|
+
transition: theme.transitions.create('height'),
|
|
58
|
+
variants: [{
|
|
59
|
+
props: {
|
|
60
|
+
orientation: 'horizontal'
|
|
61
|
+
},
|
|
62
|
+
style: {
|
|
63
|
+
height: 'auto',
|
|
64
|
+
width: 0,
|
|
65
|
+
transition: theme.transitions.create('width')
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
props: {
|
|
69
|
+
state: 'entered'
|
|
70
|
+
},
|
|
71
|
+
style: {
|
|
72
|
+
height: 'auto',
|
|
73
|
+
overflow: 'visible'
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
props: {
|
|
77
|
+
state: 'entered',
|
|
78
|
+
orientation: 'horizontal'
|
|
79
|
+
},
|
|
80
|
+
style: {
|
|
81
|
+
width: 'auto'
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
props: ({
|
|
85
|
+
ownerState
|
|
86
|
+
}) => ownerState.state === 'exited' && !ownerState.in && ownerState.collapsedSize === '0px',
|
|
87
|
+
style: {
|
|
88
|
+
visibility: 'hidden'
|
|
89
|
+
}
|
|
90
|
+
}]
|
|
70
91
|
}));
|
|
71
|
-
const CollapseWrapper = (0,
|
|
92
|
+
const CollapseWrapper = (0, _zeroStyled.styled)('div', {
|
|
72
93
|
name: 'MuiCollapse',
|
|
73
94
|
slot: 'Wrapper',
|
|
74
95
|
overridesResolver: (props, styles) => styles.wrapper
|
|
75
|
-
})(
|
|
76
|
-
ownerState
|
|
77
|
-
}) => (0, _extends2.default)({
|
|
96
|
+
})({
|
|
78
97
|
// Hack to get children with a negative margin to not falsify the height computation.
|
|
79
98
|
display: 'flex',
|
|
80
|
-
width: '100%'
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
99
|
+
width: '100%',
|
|
100
|
+
variants: [{
|
|
101
|
+
props: {
|
|
102
|
+
orientation: 'horizontal'
|
|
103
|
+
},
|
|
104
|
+
style: {
|
|
105
|
+
width: 'auto',
|
|
106
|
+
height: '100%'
|
|
107
|
+
}
|
|
108
|
+
}]
|
|
109
|
+
});
|
|
110
|
+
const CollapseWrapperInner = (0, _zeroStyled.styled)('div', {
|
|
86
111
|
name: 'MuiCollapse',
|
|
87
112
|
slot: 'WrapperInner',
|
|
88
113
|
overridesResolver: (props, styles) => styles.wrapperInner
|
|
89
|
-
})(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
114
|
+
})({
|
|
115
|
+
width: '100%',
|
|
116
|
+
variants: [{
|
|
117
|
+
props: {
|
|
118
|
+
orientation: 'horizontal'
|
|
119
|
+
},
|
|
120
|
+
style: {
|
|
121
|
+
width: 'auto',
|
|
122
|
+
height: '100%'
|
|
123
|
+
}
|
|
124
|
+
}]
|
|
125
|
+
});
|
|
97
126
|
|
|
98
127
|
/**
|
|
99
128
|
* The Collapse transition is used by the
|
|
@@ -101,7 +130,7 @@ const CollapseWrapperInner = (0, _styled.default)('div', {
|
|
|
101
130
|
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
102
131
|
*/
|
|
103
132
|
const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
104
|
-
const props = (
|
|
133
|
+
const props = useThemeProps({
|
|
105
134
|
props: inProps,
|
|
106
135
|
name: 'MuiCollapse'
|
|
107
136
|
});
|
|
@@ -381,5 +410,7 @@ process.env.NODE_ENV !== "production" ? Collapse.propTypes /* remove-proptypes *
|
|
|
381
410
|
exit: _propTypes.default.number
|
|
382
411
|
})])
|
|
383
412
|
} : void 0;
|
|
384
|
-
Collapse
|
|
413
|
+
if (Collapse) {
|
|
414
|
+
Collapse.muiSupportAuto = true;
|
|
415
|
+
}
|
|
385
416
|
var _default = exports.default = Collapse;
|