@mui/material 5.11.15 → 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.
Files changed (50) hide show
  1. package/Autocomplete/Autocomplete.js +9 -1
  2. package/Badge/badgeClasses.d.ts +18 -18
  3. package/CHANGELOG.md +66 -4
  4. package/CardActionArea/CardActionArea.js +2 -0
  5. package/NativeSelect/NativeSelectInput.d.ts +1 -0
  6. package/NativeSelect/NativeSelectInput.js +12 -5
  7. package/NativeSelect/nativeSelectClasses.d.ts +2 -0
  8. package/NativeSelect/nativeSelectClasses.js +1 -1
  9. package/Select/Select.js +14 -9
  10. package/Select/SelectInput.d.ts +1 -0
  11. package/Select/SelectInput.js +14 -4
  12. package/Select/selectClasses.d.ts +2 -0
  13. package/Select/selectClasses.js +1 -1
  14. package/Slider/Slider.js +6 -6
  15. package/Slider/sliderClasses.d.ts +22 -22
  16. package/Unstable_Grid2/Grid2.js +1 -0
  17. package/index.js +1 -1
  18. package/legacy/Autocomplete/Autocomplete.js +8 -3
  19. package/legacy/CardActionArea/CardActionArea.js +2 -0
  20. package/legacy/NativeSelect/NativeSelectInput.js +12 -5
  21. package/legacy/NativeSelect/nativeSelectClasses.js +1 -1
  22. package/legacy/Select/Select.js +14 -9
  23. package/legacy/Select/SelectInput.js +14 -5
  24. package/legacy/Select/selectClasses.js +1 -1
  25. package/legacy/Slider/Slider.js +6 -6
  26. package/legacy/Unstable_Grid2/Grid2.js +1 -0
  27. package/legacy/index.js +1 -1
  28. package/modern/Autocomplete/Autocomplete.js +9 -1
  29. package/modern/CardActionArea/CardActionArea.js +2 -0
  30. package/modern/NativeSelect/NativeSelectInput.js +12 -5
  31. package/modern/NativeSelect/nativeSelectClasses.js +1 -1
  32. package/modern/Select/Select.js +14 -9
  33. package/modern/Select/SelectInput.js +14 -4
  34. package/modern/Select/selectClasses.js +1 -1
  35. package/modern/Slider/Slider.js +6 -6
  36. package/modern/Unstable_Grid2/Grid2.js +1 -0
  37. package/modern/index.js +1 -1
  38. package/node/Autocomplete/Autocomplete.js +9 -1
  39. package/node/CardActionArea/CardActionArea.js +2 -0
  40. package/node/NativeSelect/NativeSelectInput.js +12 -5
  41. package/node/NativeSelect/nativeSelectClasses.js +1 -1
  42. package/node/Select/Select.js +14 -9
  43. package/node/Select/SelectInput.js +14 -4
  44. package/node/Select/selectClasses.js +1 -1
  45. package/node/Slider/Slider.js +6 -6
  46. package/node/Unstable_Grid2/Grid2.js +1 -0
  47. package/node/index.js +1 -1
  48. package/package.json +5 -5
  49. package/umd/material-ui.development.js +81 -45
  50. package/umd/material-ui.production.min.js +9 -9
@@ -453,6 +453,9 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
453
453
  }));
454
454
  const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
455
455
  const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
456
+ const {
457
+ onMouseDown: handleInputMouseDown
458
+ } = getInputProps();
456
459
 
457
460
  // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
458
461
  const ownerState = _extends({}, props, {
@@ -543,7 +546,12 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
543
546
  InputProps: _extends({
544
547
  ref: setAnchorEl,
545
548
  className: classes.inputRoot,
546
- startAdornment
549
+ startAdornment,
550
+ onClick: event => {
551
+ if (event.target === event.currentTarget) {
552
+ handleInputMouseDown(event);
553
+ }
554
+ }
547
555
  }, (hasClearIcon || hasPopupIcon) && {
548
556
  endAdornment: /*#__PURE__*/_jsxs(AutocompleteEndAdornment, {
549
557
  className: classes.endAdornment,
@@ -1,19 +1,19 @@
1
1
  export interface BadgeClasses {
2
- /** Class name applied to the root element. */
2
+ /** Styles applied to the root element. */
3
3
  root: string;
4
- /** Class name applied to the badge `span` element. */
4
+ /** Styles applied to the badge `span` element. */
5
5
  badge: string;
6
- /** Class name applied to the badge `span` element if `variant="dot"`. */
6
+ /** Styles applied to the badge `span` element if `variant="dot"`. */
7
7
  dot: string;
8
- /** Class name applied to the badge `span` element if `variant="standard"`. */
8
+ /** Styles applied to the badge `span` element if `variant="standard"`. */
9
9
  standard: string;
10
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }}`. */
10
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }}`. */
11
11
  anchorOriginTopRight: string;
12
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }}`. */
12
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }}`. */
13
13
  anchorOriginBottomRight: string;
14
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }}`. */
14
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }}`. */
15
15
  anchorOriginTopLeft: string;
16
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }}`. */
16
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }}`. */
17
17
  anchorOriginBottomLeft: string;
18
18
  /** State class applied to the badge `span` element if `invisible={true}`. */
19
19
  invisible: string;
@@ -29,25 +29,25 @@ export interface BadgeClasses {
29
29
  colorSuccess: string;
30
30
  /** Styles applied to the badge `span` element if `color="warning"`. */
31
31
  colorWarning: string;
32
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }} overlap="rectangular"`. */
32
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }} overlap="rectangular"`. */
33
33
  anchorOriginTopRightRectangular: string;
34
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }} overlap="rectangular"`. */
34
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }} overlap="rectangular"`. */
35
35
  anchorOriginBottomRightRectangular: string;
36
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }} overlap="rectangular"`. */
36
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }} overlap="rectangular"`. */
37
37
  anchorOriginTopLeftRectangular: string;
38
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }} overlap="rectangular"`. */
38
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }} overlap="rectangular"`. */
39
39
  anchorOriginBottomLeftRectangular: string;
40
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }} overlap="circular"`. */
40
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }} overlap="circular"`. */
41
41
  anchorOriginTopRightCircular: string;
42
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }} overlap="circular"`. */
42
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }} overlap="circular"`. */
43
43
  anchorOriginBottomRightCircular: string;
44
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }} overlap="circular"`. */
44
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }} overlap="circular"`. */
45
45
  anchorOriginTopLeftCircular: string;
46
- /** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }} overlap="circular"`. */
46
+ /** Styles applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }} overlap="circular"`. */
47
47
  anchorOriginBottomLeftCircular: string;
48
- /** Class name applied to the badge `span` element if `overlap="rectangular"`. */
48
+ /** Styles applied to the badge `span` element if `overlap="rectangular"`. */
49
49
  overlapRectangular: string;
50
- /** Class name applied to the badge `span` element if `overlap="circular"`. */
50
+ /** Styles applied to the badge `span` element if `overlap="circular"`. */
51
51
  overlapCircular: string;
52
52
  }
53
53
  export type BadgeClassKey = keyof BadgeClasses;
package/CHANGELOG.md CHANGED
@@ -1,5 +1,67 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.11.16
4
+
5
+ <!-- generated comparing v5.11.15..master -->
6
+
7
+ _Apr 4, 2023_
8
+
9
+ A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 💅 Added tabs on API pages of Base UI to switch between component and hook references (#35938) @mnajdova
12
+ - 🐛 bug fixes and 📚 documentation improvements.
13
+
14
+ ### `@mui/material@5.11.16`
15
+
16
+ - [Autocomplete] Listen for click on the root element (#36369) @sai6855
17
+ - [Autocomplete] Fix navigation issue on mouse hover (#35196) @sai6855
18
+ - [Card] Fix Card focus effect overflowing parent card (#36329) @mj12albert
19
+ - [Grid] Missing slot (#36765) @siriwatknp
20
+ - [Select] Make error part of the `ownerState` to enable overriding styles with it in theme (#36422) @gitstart
21
+ - [Slider] Fix ValueLabel UI issues comes when size="small" and orientation="vertical (#36738) @yushanwebdev
22
+
23
+ ### `@mui/icons-material@5.11.16`
24
+
25
+ - [icons] Do not ignore popular icons (#36608) @michaldudak
26
+
27
+ ### `@mui/joy@5.0.0-alpha.74`
28
+
29
+ - [Joy] Add `ModalOverflow` component (#36262) @siriwatknp
30
+ - [Joy] Fix `Checkbox` custom color prop type warning (#36691) @amal-qb
31
+
32
+ ### Docs
33
+
34
+ - [docs][base] Add return type for `useFormControlUnstyledContext` hook (#36302) @HeVictor
35
+ - [docs][base] Move styles to the bottom of demos code for `FormControl` (#36579) @gitstart
36
+ - [docs][base] Move styles to the bottom of demos code for `Menu` (#36582) @gitstart
37
+ - [docs][base] Move styles code to bottom in the `Button` demos (#36590) @sai6855
38
+ - [docs][base] Show components & hooks API on the components page (#35938) @mnajdova
39
+ - [docs] Describe slotProps in MUI Base customization doc (#36206) @michaldudak
40
+ - [docs] Fix double API page redirection (#36743) @oliviertassinari
41
+ - [docs] Remove hash property and leverage pathname (#36764) @siriwatknp
42
+ - [docs] Introduce markdown permalink to source (#36729) @oliviertassinari
43
+ - [docs] Tabs API add slots section (#36769) @mnajdova
44
+ - [docs] Update feedbacks management on slack (#36705) @alexfauquette
45
+ - [docs] Fix Joy UI URL to tokens (#36742) @oliviertassinari
46
+ - [docs] Add toggle-button coming soon page (#36618) @siriwatknp
47
+ - [docs] Fix typo on the Joy UI theme builder (#36734) @danilo-leal
48
+ - [docs] Fix small typo (#36727) @RBerthier
49
+ - [docs] Fix Joy UI template broken image loading @oliviertassinari
50
+ - [docs] Hide the default API column if it's empty (#36715) @mnajdova
51
+ - [docs] Update Material UI Related Projects page (#34203) @viclafouch
52
+ - [docs] Revise Joy UI "Circular Progress" page (#36126) @LadyBluenotes
53
+ - [docs] Revise Joy UI "Radio" page (#35893) @DevinCLane
54
+ - [docs] Support Google Analytics 4 (#36123) @alexfauquette
55
+ - [docs][material] Keep consistency in description of classes (#36631) @hbjORbj
56
+ - [docs] Remove redundant files and fix regression (#36775) @ZeeshanTamboli
57
+
58
+ ### Core
59
+
60
+ - [blog] Compress images @oliviertassinari
61
+ - [core] Remove unused token (#36722) @oliviertassinari
62
+
63
+ All contributors of this release in alphabetical order: @alexfauquette, @amal-qb, @danilo-leal, @DevinCLane, @gitstart, @hbjORbj, @HeVictor, @LadyBluenotes, @michaldudak, @mj12albert, @mnajdova, @oliviertassinari, @RBerthier, @sai6855, @siriwatknp, @viclafouch, @yushanwebdev
64
+
3
65
  ## 5.11.15
4
66
 
5
67
  <!-- generated comparing v5.11.14..master -->
@@ -5406,7 +5468,7 @@ _Sep 1, 2021_
5406
5468
  A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
5407
5469
 
5408
5470
  - 🎉 Renamed packages to `@mui/*` as part of rebranding the company, following the strategy of expanding the library scope beyond Material Design. For more details about it, check the [GitHub discussion](https://github.com/mui/material-ui/discussions/27803).
5409
- - 🛠 Added `mui-replace` codemod for migrating `@material-ui/*` to new packages `@mui/*`. Check out this [codemod detail](https://github.com/mui/material-ui/blob/next/packages/mui-codemod/README.md#mui-replace) or head to [migration guide](https://mui.com/material-ui/migration/migration-v4/#preset-safe)
5471
+ - 🛠 Added `mui-replace` codemod for migrating `@material-ui/*` to new packages `@mui/*`. Check out this [codemod detail](https://github.com/mui/material-ui/blob/v5.0.0/packages/mui-codemod/README.md#mui-replace) or head to [migration guide](https://mui.com/material-ui/migration/migration-v4/#preset-safe)
5410
5472
  - 🧪 Added new `<Mansory>` component to the lab, [check it out](https://mui.com/components/masonry/). It has been crafted by our first intern, @hbjORbj 👏!
5411
5473
 
5412
5474
  ### `@mui/material@5.0.0-rc.0`
@@ -5438,7 +5500,7 @@ A big thanks to the 18 contributors who made this release possible. Here are som
5438
5500
 
5439
5501
  > **Note**: `@mui/base` (previously `@material-ui/unstyled`) is not the same as `@material-ui/core`.
5440
5502
 
5441
- We encourage you to use the [codemod](https://github.com/mui/material-ui/blob/next/packages/mui-codemod/README.md#mui-replace) for smooth migration.
5503
+ We encourage you to use the [codemod](https://github.com/mui/material-ui/blob/v5.0.0/packages/mui-codemod/README.md#mui-replace) for smooth migration.
5442
5504
 
5443
5505
  #### Changes
5444
5506
 
@@ -6573,7 +6635,7 @@ A big thanks to the 14 contributors who made this release possible. Here are som
6573
6635
 
6574
6636
  - 👩‍🎤 We have completed the migration to emotion of all the components (`@material-ui/core` and `@material-ui/lab`) @siriwatknp, @mnajdova.
6575
6637
  - 📦 Save [10 kB gzipped](https://bundlephobia.com/package/@material-ui/core@5.0.0-alpha.34) by removing the dependency on `@material-ui/styles` (JSS) from the core and the lab (#26377, #26382, #26376) @mnajdova.
6576
- - ⚒️ Add many new [codemods](https://github.com/mui/material-ui/blob/HEAD/packages/mui-codemod/README.md) to automate the migration from v4 to v5 (#24867) @mbrookes.
6638
+ - ⚒️ Add many new [codemods](https://github.com/mui/material-ui/blob/v5.0.0/packages/mui-codemod/README.md) to automate the migration from v4 to v5 (#24867) @mbrookes.
6577
6639
  - And many more 🐛 bug fixes and 📚 improvements.
6578
6640
 
6579
6641
  ### `@material-ui/core@5.0.0-alpha.35`
@@ -8841,7 +8903,7 @@ A big thanks to the 17 contributors who made this release possible. Here are som
8841
8903
 
8842
8904
  - [Box] Remove deprecated props (#23716) @mnajdova
8843
8905
  All props are now available under the `sx` prop. A deprecation will be landing in v4.
8844
- Thanks to @mbrookes developers can automate the migration with a [codemod](https://github.com/mui/material-ui/blob/next/packages/mui-codemod/README.md#box-sx-prop).
8906
+ Thanks to @mbrookes developers can automate the migration with a [codemod](https://github.com/mui/material-ui/blob/v5.0.0/packages/mui-codemod/README.md#box-sx-prop).
8845
8907
 
8846
8908
  ```diff
8847
8909
  -<Box p={2} bgcolor="primary.main">
@@ -30,6 +30,8 @@ const CardActionAreaRoot = styled(ButtonBase, {
30
30
  }) => ({
31
31
  display: 'block',
32
32
  textAlign: 'inherit',
33
+ borderRadius: 'inherit',
34
+ // for Safari to work https://github.com/mui/material-ui/issues/36285.
33
35
  width: '100%',
34
36
  [`&:hover .${cardActionAreaClasses.focusHighlight}`]: {
35
37
  opacity: (theme.vars || theme).palette.action.hoverOpacity,
@@ -7,6 +7,7 @@ export interface NativeSelectInputProps extends React.SelectHTMLAttributes<HTMLS
7
7
  IconComponent: React.ElementType;
8
8
  inputRef?: React.Ref<HTMLSelectElement>;
9
9
  variant?: 'standard' | 'outlined' | 'filled';
10
+ error?: boolean;
10
11
  sx?: SxProps<Theme>;
11
12
  }
12
13
 
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["className", "disabled", "IconComponent", "inputRef", "variant"];
3
+ const _excluded = ["className", "disabled", "error", "IconComponent", "inputRef", "variant"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -17,10 +17,11 @@ const useUtilityClasses = ownerState => {
17
17
  variant,
18
18
  disabled,
19
19
  multiple,
20
- open
20
+ open,
21
+ error
21
22
  } = ownerState;
22
23
  const slots = {
23
- select: ['select', variant, disabled && 'disabled', multiple && 'multiple'],
24
+ select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],
24
25
  icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled']
25
26
  };
26
27
  return composeClasses(slots, getNativeSelectUtilityClasses, classes);
@@ -87,7 +88,7 @@ const NativeSelectSelect = styled('select', {
87
88
  const {
88
89
  ownerState
89
90
  } = props;
90
- return [styles.select, styles[ownerState.variant], {
91
+ return [styles.select, styles[ownerState.variant], ownerState.error && styles.error, {
91
92
  [`&.${nativeSelectClasses.multiple}`]: styles.multiple
92
93
  }];
93
94
  }
@@ -133,6 +134,7 @@ const NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInp
133
134
  const {
134
135
  className,
135
136
  disabled,
137
+ error,
136
138
  IconComponent,
137
139
  inputRef,
138
140
  variant = 'standard'
@@ -140,7 +142,8 @@ const NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInp
140
142
  other = _objectWithoutPropertiesLoose(props, _excluded);
141
143
  const ownerState = _extends({}, props, {
142
144
  disabled,
143
- variant
145
+ variant,
146
+ error
144
147
  });
145
148
  const classes = useUtilityClasses(ownerState);
146
149
  return /*#__PURE__*/_jsxs(React.Fragment, {
@@ -175,6 +178,10 @@ process.env.NODE_ENV !== "production" ? NativeSelectInput.propTypes = {
175
178
  * If `true`, the select is disabled.
176
179
  */
177
180
  disabled: PropTypes.bool,
181
+ /**
182
+ * If `true`, the `select input` will indicate an error.
183
+ */
184
+ error: PropTypes.bool,
178
185
  /**
179
186
  * The icon that displays the arrow.
180
187
  */
@@ -25,6 +25,8 @@ export interface NativeSelectClasses {
25
25
  iconStandard: string;
26
26
  /** Styles applied to the underlying native input component. */
27
27
  nativeInput: string;
28
+ /** State class applied to the select component `error` class. */
29
+ error: string;
28
30
  }
29
31
  export type NativeSelectClassKey = keyof NativeSelectClasses;
30
32
  export declare function getNativeSelectUtilityClasses(slot: string): string;
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
3
3
  export function getNativeSelectUtilityClasses(slot) {
4
4
  return generateUtilityClass('MuiNativeSelect', slot);
5
5
  }
6
- const nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput']);
6
+ const nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
7
7
  export default nativeSelectClasses;
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,
@@ -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'] },
@@ -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
  */
@@ -23,6 +23,8 @@ export interface SelectClasses {
23
23
  iconStandard: string;
24
24
  /** Styles applied to the underlying native input component. */
25
25
  nativeInput: string;
26
+ /** State class applied to the root element if `error={true}`. */
27
+ error: string;
26
28
  }
27
29
  export type SelectClassKey = keyof SelectClasses;
28
30
  export declare function getSelectUtilityClasses(slot: string): string;
@@ -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;
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: '24px',
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: '25%'
315
+ top: '50%'
316
316
  }
317
317
  }, ownerState.size === 'small' && {
318
318
  fontSize: theme.typography.pxToRem(12),
@@ -1,55 +1,55 @@
1
1
  export interface SliderClasses {
2
- /** Class name applied to the root element. */
2
+ /** Styles applied to the root element. */
3
3
  root: string;
4
- /** Class name applied to the root element if `color="primary"`. */
4
+ /** Styles applied to the root element if `color="primary"`. */
5
5
  colorPrimary: string;
6
- /** Class name applied to the root element if `color="secondary"`. */
6
+ /** Styles applied to the root element if `color="secondary"`. */
7
7
  colorSecondary: string;
8
- /** Class name applied to the root element if `marks` is provided with at least one label. */
8
+ /** Styles applied to the root element if `marks` is provided with at least one label. */
9
9
  marked: string;
10
- /** Class name applied to the root element if `orientation="vertical"`. */
10
+ /** Styles applied to the root element if `orientation="vertical"`. */
11
11
  vertical: string;
12
12
  /** State class applied to the root and thumb element if `disabled={true}`. */
13
13
  disabled: string;
14
14
  /** State class applied to the root if a thumb is being dragged. */
15
15
  dragging: string;
16
- /** Class name applied to the rail element. */
16
+ /** Styles applied to the rail element. */
17
17
  rail: string;
18
- /** Class name applied to the track element. */
18
+ /** Styles applied to the track element. */
19
19
  track: string;
20
- /** Class name applied to the root element if `track={false}`. */
20
+ /** Styles applied to the root element if `track={false}`. */
21
21
  trackFalse: string;
22
- /** Class name applied to the root element if `track="inverted"`. */
22
+ /** Styles applied to the root element if `track="inverted"`. */
23
23
  trackInverted: string;
24
- /** Class name applied to the thumb element. */
24
+ /** Styles applied to the thumb element. */
25
25
  thumb: string;
26
26
  /** State class applied to the thumb element if it's active. */
27
27
  active: string;
28
28
  /** State class applied to the thumb element if keyboard focused. */
29
29
  focusVisible: string;
30
- /** Class name applied to the mark element. */
30
+ /** Styles applied to the mark element. */
31
31
  mark: string;
32
- /** Class name applied to the mark element if active (depending on the value). */
32
+ /** Styles applied to the mark element if active (depending on the value). */
33
33
  markActive: string;
34
- /** Class name applied to the mark label element. */
34
+ /** Styles applied to the mark label element. */
35
35
  markLabel: string;
36
- /** Class name applied to the mark label element if active (depending on the value). */
36
+ /** Styles applied to the mark label element if active (depending on the value). */
37
37
  markLabelActive: string;
38
- /** Class name applied to the root element if `size="small"`. */
38
+ /** Styles applied to the root element if `size="small"`. */
39
39
  sizeSmall: string;
40
- /** Class name applied to the thumb element if `color="primary"`. */
40
+ /** Styles applied to the thumb element if `color="primary"`. */
41
41
  thumbColorPrimary: string;
42
- /** Class name applied to the thumb element if `color="secondary"`. */
42
+ /** Styles applied to the thumb element if `color="secondary"`. */
43
43
  thumbColorSecondary: string;
44
- /** Class name applied to the thumb element if `size="small"`. */
44
+ /** Styles applied to the thumb element if `size="small"`. */
45
45
  thumbSizeSmall: string;
46
- /** Class name applied to the thumb label element. */
46
+ /** Styles applied to the thumb label element. */
47
47
  valueLabel: string;
48
- /** Class name applied to the thumb label element if it's open. */
48
+ /** Styles applied to the thumb label element if it's open. */
49
49
  valueLabelOpen: string;
50
- /** Class name applied to the thumb label's circle element. */
50
+ /** Styles applied to the thumb label's circle element. */
51
51
  valueLabelCircle: string;
52
- /** Class name applied to the thumb label's label element. */
52
+ /** Styles applied to the thumb label's label element. */
53
53
  valueLabelLabel: string;
54
54
  }
55
55
  export type SliderClassKey = keyof SliderClasses;
@@ -4,6 +4,7 @@ import { styled, useThemeProps } from '../styles';
4
4
  const Grid2 = createGrid2({
5
5
  createStyledComponent: styled('div', {
6
6
  name: 'MuiGrid2',
7
+ slot: 'Root',
7
8
  overridesResolver: (props, styles) => styles.root
8
9
  }),
9
10
  componentName: 'MuiGrid2',
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.11.15
2
+ * @mui/material v5.11.16
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -465,8 +465,8 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
465
465
  groupedOptions = _useAutocomplete.groupedOptions;
466
466
  var hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
467
467
  var hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
468
-
469
- // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
468
+ var _getInputProps = getInputProps(),
469
+ handleInputMouseDown = _getInputProps.onMouseDown; // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
470
470
  var ownerState = _extends({}, props, {
471
471
  disablePortal: disablePortal,
472
472
  expanded: expanded,
@@ -563,7 +563,12 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
563
563
  InputProps: _extends({
564
564
  ref: setAnchorEl,
565
565
  className: classes.inputRoot,
566
- startAdornment: startAdornment
566
+ startAdornment: startAdornment,
567
+ onClick: function onClick(event) {
568
+ if (event.target === event.currentTarget) {
569
+ handleInputMouseDown(event);
570
+ }
571
+ }
567
572
  }, (hasClearIcon || hasPopupIcon) && {
568
573
  endAdornment: /*#__PURE__*/_jsxs(AutocompleteEndAdornment, {
569
574
  className: classes.endAdornment,
@@ -31,6 +31,8 @@ var CardActionAreaRoot = styled(ButtonBase, {
31
31
  return _ref2 = {
32
32
  display: 'block',
33
33
  textAlign: 'inherit',
34
+ borderRadius: 'inherit',
35
+ // for Safari to work https://github.com/mui/material-ui/issues/36285.
34
36
  width: '100%'
35
37
  }, _defineProperty(_ref2, "&:hover .".concat(cardActionAreaClasses.focusHighlight), {
36
38
  opacity: (theme.vars || theme).palette.action.hoverOpacity,