@mui/material 5.11.14 → 5.11.16
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/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/Autocomplete.js +12 -1
- package/Autocomplete/autocompleteClasses.d.ts +56 -56
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +118 -4
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/CardActionArea.js +2 -0
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/Chip.js +2 -3
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/FormControlContext.d.ts +17 -17
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControl/useFormControl.d.ts +2 -2
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +34 -34
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +46 -46
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/NativeSelectInput.d.ts +1 -0
- package/NativeSelect/NativeSelectInput.js +12 -5
- package/NativeSelect/nativeSelectClasses.d.ts +34 -32
- package/NativeSelect/nativeSelectClasses.js +1 -1
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +55 -55
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/Select.js +14 -9
- package/Select/SelectInput.d.ts +1 -0
- package/Select/SelectInput.js +14 -4
- package/Select/selectClasses.d.ts +32 -30
- package/Select/selectClasses.js +1 -1
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/Slider.js +6 -6
- package/Slider/SliderValueLabel.d.ts +15 -15
- package/Slider/SliderValueLabel.types.d.ts +24 -24
- package/Slider/sliderClasses.d.ts +58 -58
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Stack/Stack.d.ts +10 -0
- package/Stack/Stack.js +11 -1
- package/Stack/stackClasses.d.ts +6 -6
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +26 -26
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2.js +1 -0
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Autocomplete/Autocomplete.js +11 -3
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/CardActionArea/CardActionArea.js +2 -0
- package/legacy/Chip/Chip.js +2 -3
- package/legacy/NativeSelect/NativeSelectInput.js +12 -5
- package/legacy/NativeSelect/nativeSelectClasses.js +1 -1
- package/legacy/Select/Select.js +14 -9
- package/legacy/Select/SelectInput.js +14 -5
- package/legacy/Select/selectClasses.js +1 -1
- package/legacy/Slider/Slider.js +6 -6
- package/legacy/Stack/Stack.js +11 -1
- package/legacy/Unstable_Grid2/Grid2.js +1 -0
- package/legacy/index.js +1 -1
- package/locale/index.d.ts +76 -76
- package/modern/Autocomplete/Autocomplete.js +12 -1
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/CardActionArea/CardActionArea.js +2 -0
- package/modern/Chip/Chip.js +2 -3
- package/modern/NativeSelect/NativeSelectInput.js +12 -5
- package/modern/NativeSelect/nativeSelectClasses.js +1 -1
- package/modern/Select/Select.js +14 -9
- package/modern/Select/SelectInput.js +14 -4
- package/modern/Select/selectClasses.js +1 -1
- package/modern/Slider/Slider.js +6 -6
- package/modern/Stack/Stack.js +11 -1
- package/modern/Unstable_Grid2/Grid2.js +1 -0
- package/modern/index.js +1 -1
- package/node/Autocomplete/Autocomplete.js +12 -1
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/CardActionArea/CardActionArea.js +2 -0
- package/node/Chip/Chip.js +2 -3
- package/node/NativeSelect/NativeSelectInput.js +12 -5
- package/node/NativeSelect/nativeSelectClasses.js +1 -1
- package/node/Select/Select.js +14 -9
- package/node/Select/SelectInput.js +14 -4
- package/node/Select/selectClasses.js +1 -1
- package/node/Slider/Slider.js +6 -6
- package/node/Stack/Stack.js +11 -1
- package/node/Unstable_Grid2/Grid2.js +1 -0
- package/node/index.js +1 -1
- package/package.json +5 -5
- package/styles/CssVarsProvider.d.ts +15 -15
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/getOverlayAlpha.d.ts +2 -2
- package/styles/shouldSkipGeneratingVar.d.ts +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/types/OverridableComponentAugmentation.d.ts +31 -31
- package/umd/material-ui.development.js +142 -102
- package/umd/material-ui.production.min.js +20 -20
- package/useMediaQuery/useMediaQuery.d.ts +46 -46
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
package/Radio/radioClasses.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export interface RadioClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
/** State class applied to the root element if `checked={true}`. */
|
|
5
|
-
checked: string;
|
|
6
|
-
/** State class applied to the root element if `disabled={true}`. */
|
|
7
|
-
disabled: string;
|
|
8
|
-
/** Styles applied to the root element if `color="primary"`. */
|
|
9
|
-
colorPrimary: string;
|
|
10
|
-
/** Styles applied to the root element if `color="secondary"`. */
|
|
11
|
-
colorSecondary: string;
|
|
12
|
-
}
|
|
13
|
-
export type RadioClassKey = keyof RadioClasses;
|
|
14
|
-
export declare function getRadioUtilityClass(slot: string): string;
|
|
15
|
-
declare const radioClasses: RadioClasses;
|
|
16
|
-
export default radioClasses;
|
|
1
|
+
export interface RadioClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** State class applied to the root element if `checked={true}`. */
|
|
5
|
+
checked: string;
|
|
6
|
+
/** State class applied to the root element if `disabled={true}`. */
|
|
7
|
+
disabled: string;
|
|
8
|
+
/** Styles applied to the root element if `color="primary"`. */
|
|
9
|
+
colorPrimary: string;
|
|
10
|
+
/** Styles applied to the root element if `color="secondary"`. */
|
|
11
|
+
colorSecondary: string;
|
|
12
|
+
}
|
|
13
|
+
export type RadioClassKey = keyof RadioClasses;
|
|
14
|
+
export declare function getRadioUtilityClass(slot: string): string;
|
|
15
|
+
declare const radioClasses: RadioClasses;
|
|
16
|
+
export default radioClasses;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface RadioGroupContextValue {
|
|
3
|
-
name: string | undefined;
|
|
4
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
5
|
-
value: any;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* @ignore - internal component.
|
|
9
|
-
*/
|
|
10
|
-
declare const RadioGroupContext: React.Context<RadioGroupContextValue | undefined>;
|
|
11
|
-
export default RadioGroupContext;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface RadioGroupContextValue {
|
|
3
|
+
name: string | undefined;
|
|
4
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
5
|
+
value: any;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @ignore - internal component.
|
|
9
|
+
*/
|
|
10
|
+
declare const RadioGroupContext: React.Context<RadioGroupContextValue | undefined>;
|
|
11
|
+
export default RadioGroupContext;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RadioGroupContextValue } from './RadioGroupContext';
|
|
2
|
-
export interface RadioGroupState extends RadioGroupContextValue {
|
|
3
|
-
}
|
|
4
|
-
export default function useRadioGroup(): RadioGroupState | undefined;
|
|
1
|
+
import { RadioGroupContextValue } from './RadioGroupContext';
|
|
2
|
+
export interface RadioGroupState extends RadioGroupContextValue {
|
|
3
|
+
}
|
|
4
|
+
export default function useRadioGroup(): RadioGroupState | undefined;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export interface RatingClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
/** Styles applied to the root element if `size="small"`. */
|
|
5
|
-
sizeSmall: string;
|
|
6
|
-
/** Styles applied to the root element if `size="medium"`. */
|
|
7
|
-
sizeMedium: string;
|
|
8
|
-
/** Styles applied to the root element if `size="large"`. */
|
|
9
|
-
sizeLarge: string;
|
|
10
|
-
/** Styles applied to the root element if `readOnly={true}`. */
|
|
11
|
-
readOnly: string;
|
|
12
|
-
/** State class applied to the root element if `disabled={true}`. */
|
|
13
|
-
disabled: string;
|
|
14
|
-
/** State class applied to the root element if keyboard focused. */
|
|
15
|
-
focusVisible: string;
|
|
16
|
-
/** Visually hide an element. */
|
|
17
|
-
visuallyHidden: string;
|
|
18
|
-
/** Styles applied to the label elements. */
|
|
19
|
-
label: string;
|
|
20
|
-
/** Styles applied to the label of the "no value" input when it is active. */
|
|
21
|
-
labelEmptyValueActive: string;
|
|
22
|
-
/** Styles applied to the icon wrapping elements. */
|
|
23
|
-
icon: string;
|
|
24
|
-
/** Styles applied to the icon wrapping elements when empty. */
|
|
25
|
-
iconEmpty: string;
|
|
26
|
-
/** Styles applied to the icon wrapping elements when filled. */
|
|
27
|
-
iconFilled: string;
|
|
28
|
-
/** Styles applied to the icon wrapping elements when hover. */
|
|
29
|
-
iconHover: string;
|
|
30
|
-
/** Styles applied to the icon wrapping elements when focus. */
|
|
31
|
-
iconFocus: string;
|
|
32
|
-
/** Styles applied to the icon wrapping elements when active. */
|
|
33
|
-
iconActive: string;
|
|
34
|
-
/** Styles applied to the icon wrapping elements when decimals are necessary. */
|
|
35
|
-
decimal: string;
|
|
36
|
-
}
|
|
37
|
-
export type RatingClassKey = keyof RatingClasses;
|
|
38
|
-
export declare function getRatingUtilityClass(slot: string): string;
|
|
39
|
-
declare const ratingClasses: RatingClasses;
|
|
40
|
-
export default ratingClasses;
|
|
1
|
+
export interface RatingClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the root element if `size="small"`. */
|
|
5
|
+
sizeSmall: string;
|
|
6
|
+
/** Styles applied to the root element if `size="medium"`. */
|
|
7
|
+
sizeMedium: string;
|
|
8
|
+
/** Styles applied to the root element if `size="large"`. */
|
|
9
|
+
sizeLarge: string;
|
|
10
|
+
/** Styles applied to the root element if `readOnly={true}`. */
|
|
11
|
+
readOnly: string;
|
|
12
|
+
/** State class applied to the root element if `disabled={true}`. */
|
|
13
|
+
disabled: string;
|
|
14
|
+
/** State class applied to the root element if keyboard focused. */
|
|
15
|
+
focusVisible: string;
|
|
16
|
+
/** Visually hide an element. */
|
|
17
|
+
visuallyHidden: string;
|
|
18
|
+
/** Styles applied to the label elements. */
|
|
19
|
+
label: string;
|
|
20
|
+
/** Styles applied to the label of the "no value" input when it is active. */
|
|
21
|
+
labelEmptyValueActive: string;
|
|
22
|
+
/** Styles applied to the icon wrapping elements. */
|
|
23
|
+
icon: string;
|
|
24
|
+
/** Styles applied to the icon wrapping elements when empty. */
|
|
25
|
+
iconEmpty: string;
|
|
26
|
+
/** Styles applied to the icon wrapping elements when filled. */
|
|
27
|
+
iconFilled: string;
|
|
28
|
+
/** Styles applied to the icon wrapping elements when hover. */
|
|
29
|
+
iconHover: string;
|
|
30
|
+
/** Styles applied to the icon wrapping elements when focus. */
|
|
31
|
+
iconFocus: string;
|
|
32
|
+
/** Styles applied to the icon wrapping elements when active. */
|
|
33
|
+
iconActive: string;
|
|
34
|
+
/** Styles applied to the icon wrapping elements when decimals are necessary. */
|
|
35
|
+
decimal: string;
|
|
36
|
+
}
|
|
37
|
+
export type RatingClassKey = keyof RatingClasses;
|
|
38
|
+
export declare function getRatingUtilityClass(slot: string): string;
|
|
39
|
+
declare const ratingClasses: RatingClasses;
|
|
40
|
+
export default ratingClasses;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface ScopedCssBaselineClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
}
|
|
5
|
-
export type ScopedCssBaselineClassKey = keyof ScopedCssBaselineClasses;
|
|
6
|
-
export declare function getScopedCssBaselineUtilityClass(slot: string): string;
|
|
7
|
-
declare const scopedCssBaselineClasses: Record<"root", string>;
|
|
8
|
-
export default scopedCssBaselineClasses;
|
|
1
|
+
export interface ScopedCssBaselineClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
}
|
|
5
|
+
export type ScopedCssBaselineClassKey = keyof ScopedCssBaselineClasses;
|
|
6
|
+
export declare function getScopedCssBaselineUtilityClass(slot: string): string;
|
|
7
|
+
declare const scopedCssBaselineClasses: Record<"root", string>;
|
|
8
|
+
export default scopedCssBaselineClasses;
|
package/Select/Select.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
var _StyledInput, _StyledFilledInput;
|
|
4
3
|
const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
|
|
5
4
|
import * as React from 'react';
|
|
6
5
|
import PropTypes from 'prop-types';
|
|
@@ -67,21 +66,26 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
67
66
|
const fcs = formControlState({
|
|
68
67
|
props,
|
|
69
68
|
muiFormControl,
|
|
70
|
-
states: ['variant']
|
|
69
|
+
states: ['variant', 'error']
|
|
71
70
|
});
|
|
72
71
|
const variant = fcs.variant || variantProp;
|
|
73
|
-
const InputComponent = input || {
|
|
74
|
-
standard: _StyledInput || (_StyledInput = /*#__PURE__*/_jsx(StyledInput, {})),
|
|
75
|
-
outlined: /*#__PURE__*/_jsx(StyledOutlinedInput, {
|
|
76
|
-
label: label
|
|
77
|
-
}),
|
|
78
|
-
filled: _StyledFilledInput || (_StyledFilledInput = /*#__PURE__*/_jsx(StyledFilledInput, {}))
|
|
79
|
-
}[variant];
|
|
80
72
|
const ownerState = _extends({}, props, {
|
|
81
73
|
variant,
|
|
82
74
|
classes: classesProp
|
|
83
75
|
});
|
|
84
76
|
const classes = useUtilityClasses(ownerState);
|
|
77
|
+
const InputComponent = input || {
|
|
78
|
+
standard: /*#__PURE__*/_jsx(StyledInput, {
|
|
79
|
+
ownerState: ownerState
|
|
80
|
+
}),
|
|
81
|
+
outlined: /*#__PURE__*/_jsx(StyledOutlinedInput, {
|
|
82
|
+
label: label,
|
|
83
|
+
ownerState: ownerState
|
|
84
|
+
}),
|
|
85
|
+
filled: /*#__PURE__*/_jsx(StyledFilledInput, {
|
|
86
|
+
ownerState: ownerState
|
|
87
|
+
})
|
|
88
|
+
}[variant];
|
|
85
89
|
const inputComponentRef = useForkRef(ref, InputComponent.ref);
|
|
86
90
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
87
91
|
children: /*#__PURE__*/React.cloneElement(InputComponent, _extends({
|
|
@@ -90,6 +94,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
90
94
|
inputComponent,
|
|
91
95
|
inputProps: _extends({
|
|
92
96
|
children,
|
|
97
|
+
error: fcs.error,
|
|
93
98
|
IconComponent,
|
|
94
99
|
variant,
|
|
95
100
|
type: undefined,
|
package/Select/SelectInput.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface SelectInputProps<T = unknown> {
|
|
|
17
17
|
autoWidth: boolean;
|
|
18
18
|
defaultOpen?: boolean;
|
|
19
19
|
disabled?: boolean;
|
|
20
|
+
error?: boolean;
|
|
20
21
|
IconComponent?: React.ElementType;
|
|
21
22
|
inputRef?: (
|
|
22
23
|
ref: HTMLSelectElement | { node: HTMLInputElement; value: SelectInputProps<T>['value'] },
|
package/Select/SelectInput.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
4
4
|
var _span;
|
|
5
|
-
const _excluded = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"];
|
|
5
|
+
const _excluded = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "error", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { isFragment } from 'react-is';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -33,6 +33,8 @@ const SelectSelect = styled('div', {
|
|
|
33
33
|
[`&.${selectClasses.select}`]: styles.select
|
|
34
34
|
}, {
|
|
35
35
|
[`&.${selectClasses.select}`]: styles[ownerState.variant]
|
|
36
|
+
}, {
|
|
37
|
+
[`&.${selectClasses.error}`]: styles.error
|
|
36
38
|
}, {
|
|
37
39
|
[`&.${selectClasses.multiple}`]: styles.multiple
|
|
38
40
|
}];
|
|
@@ -90,10 +92,11 @@ const useUtilityClasses = ownerState => {
|
|
|
90
92
|
variant,
|
|
91
93
|
disabled,
|
|
92
94
|
multiple,
|
|
93
|
-
open
|
|
95
|
+
open,
|
|
96
|
+
error
|
|
94
97
|
} = ownerState;
|
|
95
98
|
const slots = {
|
|
96
|
-
select: ['select', variant, disabled && 'disabled', multiple && 'multiple'],
|
|
99
|
+
select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],
|
|
97
100
|
icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled'],
|
|
98
101
|
nativeInput: ['nativeInput']
|
|
99
102
|
};
|
|
@@ -115,6 +118,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
115
118
|
defaultValue,
|
|
116
119
|
disabled,
|
|
117
120
|
displayEmpty,
|
|
121
|
+
error = false,
|
|
118
122
|
IconComponent,
|
|
119
123
|
inputRef: inputRefProp,
|
|
120
124
|
labelId,
|
|
@@ -420,7 +424,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
420
424
|
const ownerState = _extends({}, props, {
|
|
421
425
|
variant,
|
|
422
426
|
value,
|
|
423
|
-
open
|
|
427
|
+
open,
|
|
428
|
+
error
|
|
424
429
|
});
|
|
425
430
|
const classes = useUtilityClasses(ownerState);
|
|
426
431
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
@@ -450,6 +455,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
450
455
|
children: "\u200B"
|
|
451
456
|
})) : display
|
|
452
457
|
})), /*#__PURE__*/_jsx(SelectNativeInput, _extends({
|
|
458
|
+
"aria-invalid": error,
|
|
453
459
|
value: Array.isArray(value) ? value.join(',') : value,
|
|
454
460
|
name: name,
|
|
455
461
|
ref: inputRef,
|
|
@@ -541,6 +547,10 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
|
|
|
541
547
|
* If `true`, the selected item is displayed even if its value is empty.
|
|
542
548
|
*/
|
|
543
549
|
displayEmpty: PropTypes.bool,
|
|
550
|
+
/**
|
|
551
|
+
* If `true`, the `select input` will indicate an error.
|
|
552
|
+
*/
|
|
553
|
+
error: PropTypes.bool,
|
|
544
554
|
/**
|
|
545
555
|
* The icon that displays the arrow.
|
|
546
556
|
*/
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
export interface SelectClasses {
|
|
2
|
-
/** Styles applied to the select component `select` class. */
|
|
3
|
-
select: string;
|
|
4
|
-
/** Styles applied to the select component if `multiple={true}`. */
|
|
5
|
-
multiple: string;
|
|
6
|
-
/** Styles applied to the select component if `variant="filled"`. */
|
|
7
|
-
filled: string;
|
|
8
|
-
/** Styles applied to the select component if `variant="outlined"`. */
|
|
9
|
-
outlined: string;
|
|
10
|
-
/** Styles applied to the select component if `variant="standard"`. */
|
|
11
|
-
standard: string;
|
|
12
|
-
/** State class applied to the select component `disabled` class. */
|
|
13
|
-
disabled: string;
|
|
14
|
-
/** Styles applied to the icon component. */
|
|
15
|
-
icon: string;
|
|
16
|
-
/** Styles applied to the icon component if the popup is open. */
|
|
17
|
-
iconOpen: string;
|
|
18
|
-
/** Styles applied to the icon component if `variant="filled"`. */
|
|
19
|
-
iconFilled: string;
|
|
20
|
-
/** Styles applied to the icon component if `variant="outlined"`. */
|
|
21
|
-
iconOutlined: string;
|
|
22
|
-
/** Styles applied to the icon component if `variant="standard"`. */
|
|
23
|
-
iconStandard: string;
|
|
24
|
-
/** Styles applied to the underlying native input component. */
|
|
25
|
-
nativeInput: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export
|
|
1
|
+
export interface SelectClasses {
|
|
2
|
+
/** Styles applied to the select component `select` class. */
|
|
3
|
+
select: string;
|
|
4
|
+
/** Styles applied to the select component if `multiple={true}`. */
|
|
5
|
+
multiple: string;
|
|
6
|
+
/** Styles applied to the select component if `variant="filled"`. */
|
|
7
|
+
filled: string;
|
|
8
|
+
/** Styles applied to the select component if `variant="outlined"`. */
|
|
9
|
+
outlined: string;
|
|
10
|
+
/** Styles applied to the select component if `variant="standard"`. */
|
|
11
|
+
standard: string;
|
|
12
|
+
/** State class applied to the select component `disabled` class. */
|
|
13
|
+
disabled: string;
|
|
14
|
+
/** Styles applied to the icon component. */
|
|
15
|
+
icon: string;
|
|
16
|
+
/** Styles applied to the icon component if the popup is open. */
|
|
17
|
+
iconOpen: string;
|
|
18
|
+
/** Styles applied to the icon component if `variant="filled"`. */
|
|
19
|
+
iconFilled: string;
|
|
20
|
+
/** Styles applied to the icon component if `variant="outlined"`. */
|
|
21
|
+
iconOutlined: string;
|
|
22
|
+
/** Styles applied to the icon component if `variant="standard"`. */
|
|
23
|
+
iconStandard: string;
|
|
24
|
+
/** Styles applied to the underlying native input component. */
|
|
25
|
+
nativeInput: string;
|
|
26
|
+
/** State class applied to the root element if `error={true}`. */
|
|
27
|
+
error: string;
|
|
28
|
+
}
|
|
29
|
+
export type SelectClassKey = keyof SelectClasses;
|
|
30
|
+
export declare function getSelectUtilityClasses(slot: string): string;
|
|
31
|
+
declare const selectClasses: SelectClasses;
|
|
32
|
+
export default selectClasses;
|
package/Select/selectClasses.js
CHANGED
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getSelectUtilityClasses(slot) {
|
|
4
4
|
return generateUtilityClass('MuiSelect', slot);
|
|
5
5
|
}
|
|
6
|
-
const selectClasses = generateUtilityClasses('MuiSelect', ['select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput']);
|
|
6
|
+
const selectClasses = generateUtilityClasses('MuiSelect', ['select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
|
|
7
7
|
export default selectClasses;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export interface SkeletonClasses {
|
|
2
|
-
/** Styles applied to the root element. */
|
|
3
|
-
root: string;
|
|
4
|
-
/** Styles applied to the root element if `variant="text"`. */
|
|
5
|
-
text: string;
|
|
6
|
-
/** Styles applied to the root element if `variant="rectangular"`. */
|
|
7
|
-
rectangular: string;
|
|
8
|
-
/** Styles applied to the root element if `variant="rounded"`. */
|
|
9
|
-
rounded: string;
|
|
10
|
-
/** Styles applied to the root element if `variant="circular"`. */
|
|
11
|
-
circular: string;
|
|
12
|
-
/** Styles applied to the root element if `animation="pulse"`. */
|
|
13
|
-
pulse: string;
|
|
14
|
-
/** Styles applied to the root element if `animation="wave"`. */
|
|
15
|
-
wave: string;
|
|
16
|
-
/** Styles applied when the component is passed children. */
|
|
17
|
-
withChildren: string;
|
|
18
|
-
/** Styles applied when the component is passed children and no width. */
|
|
19
|
-
fitContent: string;
|
|
20
|
-
/** Styles applied when the component is passed children and no height. */
|
|
21
|
-
heightAuto: string;
|
|
22
|
-
}
|
|
23
|
-
export type SkeletonClassKey = keyof SkeletonClasses;
|
|
24
|
-
export declare function getSkeletonUtilityClass(slot: string): string;
|
|
25
|
-
declare const skeletonClasses: SkeletonClasses;
|
|
26
|
-
export default skeletonClasses;
|
|
1
|
+
export interface SkeletonClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the root element if `variant="text"`. */
|
|
5
|
+
text: string;
|
|
6
|
+
/** Styles applied to the root element if `variant="rectangular"`. */
|
|
7
|
+
rectangular: string;
|
|
8
|
+
/** Styles applied to the root element if `variant="rounded"`. */
|
|
9
|
+
rounded: string;
|
|
10
|
+
/** Styles applied to the root element if `variant="circular"`. */
|
|
11
|
+
circular: string;
|
|
12
|
+
/** Styles applied to the root element if `animation="pulse"`. */
|
|
13
|
+
pulse: string;
|
|
14
|
+
/** Styles applied to the root element if `animation="wave"`. */
|
|
15
|
+
wave: string;
|
|
16
|
+
/** Styles applied when the component is passed children. */
|
|
17
|
+
withChildren: string;
|
|
18
|
+
/** Styles applied when the component is passed children and no width. */
|
|
19
|
+
fitContent: string;
|
|
20
|
+
/** Styles applied when the component is passed children and no height. */
|
|
21
|
+
heightAuto: string;
|
|
22
|
+
}
|
|
23
|
+
export type SkeletonClassKey = keyof SkeletonClasses;
|
|
24
|
+
export declare function getSkeletonUtilityClass(slot: string): string;
|
|
25
|
+
declare const skeletonClasses: SkeletonClasses;
|
|
26
|
+
export default skeletonClasses;
|
package/Slider/Slider.js
CHANGED
|
@@ -269,7 +269,7 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
|
|
|
269
269
|
ownerState
|
|
270
270
|
}) => _extends({
|
|
271
271
|
[`&.${sliderClasses.valueLabelOpen}`]: {
|
|
272
|
-
transform: 'translateY(-100%) scale(1)
|
|
272
|
+
transform: `${ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(1)`
|
|
273
273
|
},
|
|
274
274
|
zIndex: 1,
|
|
275
275
|
whiteSpace: 'nowrap'
|
|
@@ -278,7 +278,7 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
|
|
|
278
278
|
transition: theme.transitions.create(['transform'], {
|
|
279
279
|
duration: theme.transitions.duration.shortest
|
|
280
280
|
}),
|
|
281
|
-
transform: 'translateY(-100%) scale(0)
|
|
281
|
+
transform: `${ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(0)`,
|
|
282
282
|
position: 'absolute',
|
|
283
283
|
backgroundColor: (theme.vars || theme).palette.grey[600],
|
|
284
284
|
borderRadius: 2,
|
|
@@ -301,18 +301,18 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
|
|
|
301
301
|
left: '50%'
|
|
302
302
|
}
|
|
303
303
|
}, ownerState.orientation === 'vertical' && {
|
|
304
|
-
right: '30px',
|
|
305
|
-
top: '
|
|
304
|
+
right: ownerState.size === 'small' ? '20px' : '30px',
|
|
305
|
+
top: '50%',
|
|
306
306
|
transformOrigin: 'right center',
|
|
307
307
|
'&:before': {
|
|
308
308
|
position: 'absolute',
|
|
309
309
|
content: '""',
|
|
310
310
|
width: 8,
|
|
311
311
|
height: 8,
|
|
312
|
-
transform: 'translate(-50%, 50%) rotate(45deg)',
|
|
312
|
+
transform: 'translate(-50%, -50%) rotate(45deg)',
|
|
313
313
|
backgroundColor: 'inherit',
|
|
314
314
|
right: '-20%',
|
|
315
|
-
top: '
|
|
315
|
+
top: '50%'
|
|
316
316
|
}
|
|
317
317
|
}, ownerState.size === 'small' && {
|
|
318
318
|
fontSize: theme.typography.pxToRem(12),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { SliderValueLabelProps } from './SliderValueLabel.types';
|
|
4
|
-
/**
|
|
5
|
-
* @ignore - internal component.
|
|
6
|
-
*/
|
|
7
|
-
declare function SliderValueLabel(props: SliderValueLabelProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
8
|
-
declare namespace SliderValueLabel {
|
|
9
|
-
var propTypes: {
|
|
10
|
-
children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
11
|
-
className: PropTypes.Requireable<string>;
|
|
12
|
-
value: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export default SliderValueLabel;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { SliderValueLabelProps } from './SliderValueLabel.types';
|
|
4
|
+
/**
|
|
5
|
+
* @ignore - internal component.
|
|
6
|
+
*/
|
|
7
|
+
declare function SliderValueLabel(props: SliderValueLabelProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
8
|
+
declare namespace SliderValueLabel {
|
|
9
|
+
var propTypes: {
|
|
10
|
+
children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
11
|
+
className: PropTypes.Requireable<string>;
|
|
12
|
+
value: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export default SliderValueLabel;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface SliderValueLabelProps {
|
|
3
|
-
children?: React.ReactElement;
|
|
4
|
-
className?: string;
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
/**
|
|
7
|
-
* If `true`, the value label is visible.
|
|
8
|
-
*/
|
|
9
|
-
open: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* The value of the slider.
|
|
12
|
-
* For ranged sliders, provide an array with two values.
|
|
13
|
-
*/
|
|
14
|
-
value: number;
|
|
15
|
-
/**
|
|
16
|
-
* Controls when the value label is displayed:
|
|
17
|
-
*
|
|
18
|
-
* - `auto` the value label will display when the thumb is hovered or focused.
|
|
19
|
-
* - `on` will display persistently.
|
|
20
|
-
* - `off` will never display.
|
|
21
|
-
* @default 'off'
|
|
22
|
-
*/
|
|
23
|
-
valueLabelDisplay?: 'on' | 'auto' | 'off';
|
|
24
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface SliderValueLabelProps {
|
|
3
|
+
children?: React.ReactElement;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
/**
|
|
7
|
+
* If `true`, the value label is visible.
|
|
8
|
+
*/
|
|
9
|
+
open: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The value of the slider.
|
|
12
|
+
* For ranged sliders, provide an array with two values.
|
|
13
|
+
*/
|
|
14
|
+
value: number;
|
|
15
|
+
/**
|
|
16
|
+
* Controls when the value label is displayed:
|
|
17
|
+
*
|
|
18
|
+
* - `auto` the value label will display when the thumb is hovered or focused.
|
|
19
|
+
* - `on` will display persistently.
|
|
20
|
+
* - `off` will never display.
|
|
21
|
+
* @default 'off'
|
|
22
|
+
*/
|
|
23
|
+
valueLabelDisplay?: 'on' | 'auto' | 'off';
|
|
24
|
+
}
|