@mui/material 5.11.6 → 5.11.8

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 (51) hide show
  1. package/CHANGELOG.md +141 -1
  2. package/Checkbox/Checkbox.d.ts +3 -0
  3. package/Checkbox/Checkbox.js +3 -0
  4. package/FormLabel/FormLabel.d.ts +51 -45
  5. package/InputLabel/InputLabel.d.ts +70 -57
  6. package/MenuList/MenuList.d.ts +1 -1
  7. package/MenuList/MenuList.js +1 -1
  8. package/Popper/Popper.d.ts +19 -1
  9. package/Radio/Radio.js +2 -0
  10. package/Select/SelectInput.js +1 -1
  11. package/Switch/Switch.js +2 -0
  12. package/TabScrollButton/TabScrollButton.d.ts +1 -0
  13. package/TabScrollButton/TabScrollButton.js +1 -0
  14. package/Tooltip/Tooltip.js +9 -9
  15. package/index.js +1 -1
  16. package/internal/SwitchBase.d.ts +5 -0
  17. package/internal/SwitchBase.js +1 -1
  18. package/legacy/Checkbox/Checkbox.js +3 -0
  19. package/legacy/MenuList/MenuList.js +1 -1
  20. package/legacy/Radio/Radio.js +2 -0
  21. package/legacy/Select/SelectInput.js +1 -1
  22. package/legacy/Switch/Switch.js +2 -0
  23. package/legacy/TabScrollButton/TabScrollButton.js +1 -0
  24. package/legacy/Tooltip/Tooltip.js +9 -9
  25. package/legacy/index.js +1 -1
  26. package/legacy/internal/SwitchBase.js +2 -1
  27. package/legacy/styles/CssVarsProvider.js +3 -1
  28. package/modern/Checkbox/Checkbox.js +3 -0
  29. package/modern/MenuList/MenuList.js +1 -1
  30. package/modern/Radio/Radio.js +2 -0
  31. package/modern/Select/SelectInput.js +1 -1
  32. package/modern/Switch/Switch.js +2 -0
  33. package/modern/TabScrollButton/TabScrollButton.js +1 -0
  34. package/modern/Tooltip/Tooltip.js +9 -9
  35. package/modern/index.js +1 -1
  36. package/modern/internal/SwitchBase.js +1 -1
  37. package/modern/styles/CssVarsProvider.js +3 -1
  38. package/node/Checkbox/Checkbox.js +3 -0
  39. package/node/MenuList/MenuList.js +1 -1
  40. package/node/Radio/Radio.js +2 -0
  41. package/node/Select/SelectInput.js +1 -1
  42. package/node/Switch/Switch.js +2 -0
  43. package/node/TabScrollButton/TabScrollButton.js +1 -0
  44. package/node/Tooltip/Tooltip.js +9 -9
  45. package/node/index.js +1 -1
  46. package/node/internal/SwitchBase.js +1 -1
  47. package/node/styles/CssVarsProvider.js +3 -1
  48. package/package.json +5 -5
  49. package/styles/CssVarsProvider.js +3 -1
  50. package/umd/material-ui.development.js +149 -72
  51. package/umd/material-ui.production.min.js +20 -20
package/CHANGELOG.md CHANGED
@@ -1,5 +1,145 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.11.8
4
+
5
+ <!-- generated comparing v5.11.7..master -->
6
+
7
+ _Feb 7, 2023_
8
+
9
+ A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - @siriwatknp added a new [`Sign In` template](https://mui.com/joy-ui/getting-started/templates/sign-in-side/) to Joy UI (#36019)
12
+ - 📚 Documentation improvements and 🐛 bug fixes as usual
13
+
14
+ ### `@mui/material@5.11.8`
15
+
16
+ - &#8203;<!-- 10 -->[FormLabel] Export `FormLabelOwnProps` from `FormLabel` to fix type error (#36057) @yoskeoka
17
+
18
+ ### `@mui/joy@5.0.0-alpha.66`
19
+
20
+ - &#8203;<!-- 09 -->[Joy] Miscellaneous fixes (#36073) @siriwatknp
21
+ - &#8203;<!-- 08 -->[Joy] Add sign-in side template (#36019) @siriwatknp
22
+ - &#8203;<!-- 07 -->[Joy] Add missing `Table` export from root (#36010) @sai6855
23
+
24
+ ### `@mui/system@5.11.8`
25
+
26
+ - &#8203;<!-- 05 -->[System] Fix nested grid v2 (#35994) @siriwatknp
27
+
28
+ ### `@mui/styled-engine@5.11.1`
29
+
30
+ - &#8203;<!-- 06 -->[styled-engine] Create cache only if `document` is available (#36001) @m4theushw
31
+
32
+ ### Docs
33
+
34
+ - &#8203;<!-- 23 -->[blog] Fix dark mode support (#35969) @oliviertassinari
35
+ - &#8203;<!-- 19 -->[docs] Add banner pointing to "Whats new" in MUI X page (#36074) @joserodolfofreitas
36
+ - &#8203;<!-- 18 -->[docs] Revert unintended change @oliviertassinari
37
+ - &#8203;<!-- 17 -->[docs] [Joy] Fixed a typo in `customizing theme tokens` (#36067) @badalsaibo
38
+ - &#8203;<!-- 16 -->[docs] Improve inline preview's information (#35974) @oliviertassinari
39
+ - &#8203;<!-- 15 -->[docs] Fix wrong v5 migration instructions (#36022) @oliviertassinari
40
+ - &#8203;<!-- 14 -->[docs] Fix autocomplete render group key warning in the demo (#36025) @chuanyu0201
41
+ - &#8203;<!-- 13 -->[docs] Add hooks API pages for MUI Base (#35828) @mnajdova
42
+ - &#8203;<!-- 12 -->[docs] Fix grammar typo (#36016) @alexownejazayeri
43
+ - &#8203;<!-- 11 -->[docs][joy] Add JSDoc for the `AutocompleteProps` type (#36039) @ArthurPedroti
44
+
45
+ ### Core
46
+
47
+ - &#8203;<!-- 22 -->[core] Make it easier to find who is importing specific files (#35896) @oliviertassinari
48
+ - &#8203;<!-- 21 -->[core] Fix SEO redirections issues (#36041) @oliviertassinari
49
+ - &#8203;<!-- 20 -->[core] Fix a typo in the comment in setup test files (#36014) @ZeeshanTamboli
50
+ - &#8203;<!-- 04 -->[typescript] Explicitly define the component return types (#36013) @michaldudak
51
+ - &#8203;<!-- 03 -->[website] Fix layout shift (#36070) @oliviertassinari
52
+ - &#8203;<!-- 02 -->[website] Revise the Lead Designer role job ad (v1) (#36068) @oliviertassinari
53
+ - &#8203;<!-- 01 -->[website] Add Albert to the about page (#35954) @mj12albert
54
+
55
+ All contributors of this release in alphabetical order: @alexownejazayeri, @ArthurPedroti, @badalsaibo, @chuanyu0201, @joserodolfofreitas, @m4theushw, @michaldudak, @mj12albert, @mnajdova, @oliviertassinari, @sai6855, @siriwatknp, @yoskeoka, @ZeeshanTamboli
56
+
57
+ ## 5.11.7
58
+
59
+ <!-- generated comparing v5.11.6..master -->
60
+
61
+ _Jan 31, 2023_
62
+
63
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
64
+
65
+ - @siriwatknp added `Table` component to Joy UI (#35872)
66
+ - many other 🐛 bug fixes and 📚 documentation improvements
67
+
68
+ ### `@mui/material@5.11.7`
69
+
70
+ - &#8203;<!-- 30 -->[Autocomplete] Prevent reset scroll position when new options are added (#35735) @sai6855
71
+ - &#8203;<!-- 24 -->[CssVarsProvider] Skip `unstable_sxConfig` variables (#35932) @siriwatknp
72
+ - &#8203;<!-- 10 -->[InputLabel] Add missing `component` type (#35852) @sai6855
73
+ - &#8203;<!-- 05 -->[Tooltip] Fix tooltip position (#35909) @marktoman
74
+
75
+ ### `@mui/base@5.0.0-alpha.116`
76
+
77
+ - &#8203;<!-- 29 -->[ListboxUnstyled] Fix option state highlighted to prevent unnecessary focus (#35838) @SaidMarar
78
+
79
+ ### `@mui/joy@5.0.0-alpha.65`
80
+
81
+ #### Breaking changes
82
+
83
+ - &#8203;<!-- 05 -->[Joy] Replace `Joy[Component]` classname with `Mui[Component]` classname for all slots of components (#35718) @hbjORbj
84
+
85
+ - Renames the classname prefix of all Joy UI components from `'Joy'` to `'Mui'`.
86
+
87
+ ```diff
88
+ <Button
89
+ -sx={{ '& .JoyButton-root': { '& .JoyButton-button': {} } }}
90
+ +sx={{ '& .MuiButton-root': { '& .MuiButton-button': {} } }}
91
+ />
92
+ ```
93
+
94
+ You can use this [codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#joy-rename-classname-prefix) to help with the migration.
95
+
96
+ - &#8203;<!-- 04 -->[Joy] Replace `row` prop with `orientation` prop in all Joy UI components (#35721) @hbjORbj
97
+
98
+ - Transforms `row` prop to `orientation` prop across `Card`, `List` and `RadioGroup` components in Joy UI.
99
+
100
+ ```diff
101
+ <Card
102
+ -row
103
+ +orientation={"horizontal"}
104
+ />
105
+ ```
106
+
107
+ You can use this [codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#joy-rename-row-prop) to help with the migration.
108
+
109
+ #### Changes
110
+
111
+ - &#8203;<!-- 26 -->[Joy][Checkbox] Display correct icon in checkbox (#35943) @sai6855
112
+ - &#8203;<!-- 09 -->[Joy] Add `Table` component (#35872) @siriwatknp
113
+ - &#8203;<!-- 08 -->[Joy] Miscellaneous fixes (#35953) @siriwatknp
114
+
115
+ ### Docs
116
+
117
+ - &#8203;<!-- 28 -->[blog] Add RSS feed (#35777) @gorjiali
118
+ - &#8203;<!-- 27 -->[blog] Prevent horizontal scroll on blog posts (#35948) @oliviertassinari
119
+ - &#8203;<!-- 23 -->[docs] Add to codemod README about an added script (#35999) @hbjORbj
120
+ - &#8203;<!-- 22 -->[docs] Add a warning about to clear the local storage when `defaultMode` changes (#35937) @ArthurPedroti
121
+ - &#8203;<!-- 21 -->[docs] Fix Joy UI variables playground (#35950) @siriwatknp
122
+ - &#8203;<!-- 20 -->[docs] Fix typos in base components docs (#35985) @HeVictor
123
+ - &#8203;<!-- 19 -->[docs] Fix event's label reported to GA (#35930) @oliviertassinari
124
+ - &#8203;<!-- 18 -->[docs] Standardize "no longer" / "not documented" callouts in Material UI docs (#35957) @samuelsycamore
125
+ - &#8203;<!-- 17 -->[docs] Revise and expand Joy UI Checkbox doc (#35817) @samuelsycamore
126
+ - &#8203;<!-- 16 -->[docs] Add docs notification to Date and Time Pickers revamped (#35935) @joserodolfofreitas
127
+ - &#8203;<!-- 15 -->[docs] Update community theme builder to forked updated one (#35928) @idebeijer
128
+ - &#8203;<!-- 14 -->[docs] Add Joy default theme viewer (#35554) @siriwatknp
129
+ - &#8203;<!-- 13 -->[docs][joy] Fixed a typo in `Using icon libraries` page (#35989) @badalsaibo
130
+ - &#8203;<!-- 12 -->[docs][joy] Removed Badge info from Chip docs (#35955) @Vivek-Prajapatii
131
+ - &#8203;<!-- 11 -->[docs][system] Fix border color of Boxes in demos of `Configure the sx prop` page in dark mode (#35961) @ZeeshanTamboli
132
+
133
+ ### Core
134
+
135
+ - &#8203;<!-- 25 -->[core] Boolean props always have a default value of `false` in API docs (#35913) @hbjORbj
136
+ - &#8203;<!-- 04 -->[core] Improve types for usePreviousProps (#35833) @sai6855
137
+ - &#8203;<!-- 03 -->[website] Fix 404 link to store (#35973) @oliviertassinari
138
+ - &#8203;<!-- 02 -->[website] Fix 302 of diamond sponsor link @oliviertassinari
139
+ - &#8203;<!-- 01 -->[website] Fix outdated YouTube link @oliviertassinari
140
+
141
+ All contributors of this release in alphabetical order: @ArthurPedroti, @badalsaibo, @gorjiali, @hbjORbj, @HeVictor, @idebeijer, @joserodolfofreitas, @marktoman, @oliviertassinari, @sai6855, @SaidMarar, @samuelsycamore, @siriwatknp, @Vivek-Prajapatii, @ZeeshanTamboli
142
+
3
143
  ## 5.11.6
4
144
 
5
145
  <!-- generated comparing v5.11.5..master -->
@@ -7277,7 +7417,7 @@ A big thanks to the 26 contributors who made this release possible. Here are som
7277
7417
 
7278
7418
  ```diff
7279
7419
  -<Tabs />
7280
- +<Tabs indicatorColor="primary" textColor="inherit" />
7420
+ +<Tabs indicatorColor="secondary" textColor="inherit" />
7281
7421
  ```
7282
7422
 
7283
7423
  #### Changes
@@ -36,10 +36,12 @@ export interface CheckboxProps
36
36
  >;
37
37
  /**
38
38
  * If `true`, the component is disabled.
39
+ * @default false
39
40
  */
40
41
  disabled?: SwitchBaseProps['disabled'];
41
42
  /**
42
43
  * If `true`, the ripple effect is disabled.
44
+ * @default false
43
45
  */
44
46
  disableRipple?: SwitchBaseProps['disableRipple'];
45
47
  /**
@@ -81,6 +83,7 @@ export interface CheckboxProps
81
83
  onChange?: SwitchBaseProps['onChange'];
82
84
  /**
83
85
  * If `true`, the `input` element is required.
86
+ * @default false
84
87
  */
85
88
  required?: SwitchBaseProps['required'];
86
89
  /**
@@ -140,10 +140,12 @@ process.env.NODE_ENV !== "production" ? Checkbox.propTypes /* remove-proptypes *
140
140
  defaultChecked: PropTypes.bool,
141
141
  /**
142
142
  * If `true`, the component is disabled.
143
+ * @default false
143
144
  */
144
145
  disabled: PropTypes.bool,
145
146
  /**
146
147
  * If `true`, the ripple effect is disabled.
148
+ * @default false
147
149
  */
148
150
  disableRipple: PropTypes.bool,
149
151
  /**
@@ -185,6 +187,7 @@ process.env.NODE_ENV !== "production" ? Checkbox.propTypes /* remove-proptypes *
185
187
  onChange: PropTypes.func,
186
188
  /**
187
189
  * If `true`, the `input` element is required.
190
+ * @default false
188
191
  */
189
192
  required: PropTypes.bool,
190
193
  /**
@@ -2,56 +2,57 @@ import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { OverridableStringUnion } from '@mui/types';
4
4
  import { Theme } from '../styles';
5
- import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
+ import { OverridableComponent, OverrideProps, OverridableTypeMap } from '../OverridableComponent';
6
6
  import { FormLabelClasses } from './formLabelClasses';
7
7
 
8
8
  export interface FormLabelPropsColorOverrides {}
9
9
 
10
+ export interface FormLabelOwnProps {
11
+ /**
12
+ * The content of the component.
13
+ */
14
+ children?: React.ReactNode;
15
+ /**
16
+ * Override or extend the styles applied to the component.
17
+ */
18
+ classes?: Partial<FormLabelClasses>;
19
+ /**
20
+ * The color of the component.
21
+ * It supports both default and custom theme colors, which can be added as shown in the
22
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
23
+ */
24
+ color?: OverridableStringUnion<
25
+ 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
26
+ FormLabelPropsColorOverrides
27
+ >;
28
+ /**
29
+ * If `true`, the label should be displayed in a disabled state.
30
+ */
31
+ disabled?: boolean;
32
+ /**
33
+ * If `true`, the label is displayed in an error state.
34
+ */
35
+ error?: boolean;
36
+ /**
37
+ * If `true`, the label should use filled classes key.
38
+ */
39
+ filled?: boolean;
40
+ /**
41
+ * If `true`, the input of this label is focused (used by `FormGroup` components).
42
+ */
43
+ focused?: boolean;
44
+ /**
45
+ * If `true`, the label will indicate that the `input` is required.
46
+ */
47
+ required?: boolean;
48
+ /**
49
+ * The system prop that allows defining system overrides as well as additional CSS styles.
50
+ */
51
+ sx?: SxProps<Theme>;
52
+ }
53
+
10
54
  export interface FormLabelTypeMap<P = {}, D extends React.ElementType = 'label'> {
11
- props: P &
12
- FormLabelBaseProps & {
13
- /**
14
- * The content of the component.
15
- */
16
- children?: React.ReactNode;
17
- /**
18
- * Override or extend the styles applied to the component.
19
- */
20
- classes?: Partial<FormLabelClasses>;
21
- /**
22
- * The color of the component.
23
- * It supports both default and custom theme colors, which can be added as shown in the
24
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
25
- */
26
- color?: OverridableStringUnion<
27
- 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
28
- FormLabelPropsColorOverrides
29
- >;
30
- /**
31
- * If `true`, the label should be displayed in a disabled state.
32
- */
33
- disabled?: boolean;
34
- /**
35
- * If `true`, the label is displayed in an error state.
36
- */
37
- error?: boolean;
38
- /**
39
- * If `true`, the label should use filled classes key.
40
- */
41
- filled?: boolean;
42
- /**
43
- * If `true`, the input of this label is focused (used by `FormGroup` components).
44
- */
45
- focused?: boolean;
46
- /**
47
- * If `true`, the label will indicate that the `input` is required.
48
- */
49
- required?: boolean;
50
- /**
51
- * The system prop that allows defining system overrides as well as additional CSS styles.
52
- */
53
- sx?: SxProps<Theme>;
54
- };
55
+ props: P & FormLabelBaseProps & FormLabelOwnProps;
55
56
  defaultComponent: D;
56
57
  }
57
58
 
@@ -71,6 +72,11 @@ declare const FormLabel: OverridableComponent<FormLabelTypeMap>;
71
72
 
72
73
  export type FormLabelBaseProps = React.LabelHTMLAttributes<HTMLLabelElement>;
73
74
 
75
+ export interface ExtendFormLabelTypeMap<M extends OverridableTypeMap> {
76
+ props: M['props'] & Pick<FormLabelOwnProps, 'filled' | 'color'>;
77
+ defaultComponent: M['defaultComponent'];
78
+ }
79
+
74
80
  export type FormLabelProps<
75
81
  D extends React.ElementType = FormLabelTypeMap['defaultComponent'],
76
82
  P = {},
@@ -1,67 +1,73 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { OverridableStringUnion } from '@mui/types';
4
- import { InternalStandardProps as StandardProps } from '..';
5
- import { FormLabelProps } from '../FormLabel';
4
+ import { FormLabelProps, ExtendFormLabelTypeMap } from '../FormLabel';
6
5
  import { Theme } from '../styles';
7
6
  import { InputLabelClasses } from './inputLabelClasses';
7
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
8
8
 
9
9
  export interface InputLabelPropsSizeOverrides {}
10
10
 
11
- export interface InputLabelProps extends StandardProps<FormLabelProps> {
12
- /**
13
- * The content of the component.
14
- */
15
- children?: React.ReactNode;
16
- /**
17
- * Override or extend the styles applied to the component.
18
- */
19
- classes?: Partial<InputLabelClasses>;
20
- color?: FormLabelProps['color'];
21
- /**
22
- * If `true`, the transition animation is disabled.
23
- * @default false
24
- */
25
- disableAnimation?: boolean;
26
- /**
27
- * If `true`, the component is disabled.
28
- */
29
- disabled?: boolean;
30
- /**
31
- * If `true`, the label is displayed in an error state.
32
- */
33
- error?: boolean;
34
- /**
35
- * If `true`, the `input` of this label is focused.
36
- */
37
- focused?: boolean;
38
- /**
39
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
40
- * FormControl.
41
- */
42
- margin?: 'dense';
43
- /**
44
- * if `true`, the label will indicate that the `input` is required.
45
- */
46
- required?: boolean;
47
- /**
48
- * If `true`, the label is shrunk.
49
- */
50
- shrink?: boolean;
51
- /**
52
- * The size of the component.
53
- * @default 'normal'
54
- */
55
- size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>;
56
- /**
57
- * The system prop that allows defining system overrides as well as additional CSS styles.
58
- */
59
- sx?: SxProps<Theme>;
60
- /**
61
- * The variant to use.
62
- */
63
- variant?: 'standard' | 'outlined' | 'filled';
64
- }
11
+ export type InputLabelTypeMap<
12
+ P = {},
13
+ D extends React.ElementType = 'label',
14
+ > = ExtendFormLabelTypeMap<{
15
+ props: P & {
16
+ /**
17
+ * The content of the component.
18
+ */
19
+ children?: React.ReactNode;
20
+ /**
21
+ * Override or extend the styles applied to the component.
22
+ */
23
+ classes?: Partial<InputLabelClasses>;
24
+ color?: FormLabelProps['color'];
25
+ /**
26
+ * If `true`, the transition animation is disabled.
27
+ * @default false
28
+ */
29
+ disableAnimation?: boolean;
30
+ /**
31
+ * If `true`, the component is disabled.
32
+ */
33
+ disabled?: boolean;
34
+ /**
35
+ * If `true`, the label is displayed in an error state.
36
+ */
37
+ error?: boolean;
38
+ /**
39
+ * If `true`, the `input` of this label is focused.
40
+ */
41
+ focused?: boolean;
42
+ /**
43
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
44
+ * FormControl.
45
+ */
46
+ margin?: 'dense';
47
+ /**
48
+ * if `true`, the label will indicate that the `input` is required.
49
+ */
50
+ required?: boolean;
51
+ /**
52
+ * If `true`, the label is shrunk.
53
+ */
54
+ shrink?: boolean;
55
+ /**
56
+ * The size of the component.
57
+ * @default 'normal'
58
+ */
59
+ size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>;
60
+ /**
61
+ * The system prop that allows defining system overrides as well as additional CSS styles.
62
+ */
63
+ sx?: SxProps<Theme>;
64
+ /**
65
+ * The variant to use.
66
+ */
67
+ variant?: 'standard' | 'outlined' | 'filled';
68
+ };
69
+ defaultComponent: D;
70
+ }>;
65
71
 
66
72
  /**
67
73
  *
@@ -74,4 +80,11 @@ export interface InputLabelProps extends StandardProps<FormLabelProps> {
74
80
  * - [InputLabel API](https://mui.com/material-ui/api/input-label/)
75
81
  * - inherits [FormLabel API](https://mui.com/material-ui/api/form-label/)
76
82
  */
77
- export default function InputLabel(props: InputLabelProps): JSX.Element;
83
+ declare const InputLabel: OverridableComponent<InputLabelTypeMap>;
84
+
85
+ export type InputLabelProps<
86
+ D extends React.ElementType = InputLabelTypeMap['defaultComponent'],
87
+ P = {},
88
+ > = OverrideProps<InputLabelTypeMap<P, D>, D>;
89
+
90
+ export default InputLabel;
@@ -42,7 +42,7 @@ export type MenuListTypeMap<P = {}, D extends React.ElementType = 'ul'> = Extend
42
42
  export type MenuListClassKey = keyof NonNullable<MenuListTypeMap['props']['classes']>;
43
43
 
44
44
  /**
45
- * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/.
45
+ * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.
46
46
  * It's exposed to help customization of the [`Menu`](https://mui.com/material-ui/api/menu/) component if you
47
47
  * use it separately you need to move focus into the component manually. Once
48
48
  * the focus is placed inside the component it is fully keyboard accessible.
@@ -72,7 +72,7 @@ function moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable,
72
72
  }
73
73
 
74
74
  /**
75
- * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/.
75
+ * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.
76
76
  * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you
77
77
  * use it separately you need to move focus into the component manually. Once
78
78
  * the focus is placed inside the component it is fully keyboard accessible.
@@ -33,5 +33,23 @@ export type PopperProps = Omit<PopperUnstyledProps, 'direction'> & {
33
33
  *
34
34
  * - [Popper API](https://mui.com/material-ui/api/popper/)
35
35
  */
36
- declare const Popper: React.ForwardRefExoticComponent<Pick<PopperProps, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "sx" | "ownerState" | "components" | "container" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots" | "componentsProps"> & React.RefAttributes<HTMLDivElement>>;
36
+ declare const Popper: React.ForwardRefExoticComponent<Omit<PopperUnstyledProps<"div", {}>, "direction"> & {
37
+ /**
38
+ * The components used for each slot inside the Popper.
39
+ * Either a string to use a HTML element or a component.
40
+ * @default {}
41
+ */
42
+ components?: {
43
+ Root?: React.ElementType<any> | undefined;
44
+ } | undefined;
45
+ /**
46
+ * The props used for each slot inside the Popper.
47
+ * @default {}
48
+ */
49
+ componentsProps?: PopperUnstyledProps['slotProps'];
50
+ /**
51
+ * The system prop that allows defining system overrides as well as additional CSS styles.
52
+ */
53
+ sx?: SxProps<Theme> | undefined;
54
+ } & React.RefAttributes<HTMLDivElement>>;
37
55
  export default Popper;
package/Radio/Radio.js CHANGED
@@ -156,6 +156,7 @@ process.env.NODE_ENV !== "production" ? Radio.propTypes /* remove-proptypes */ =
156
156
  disabled: PropTypes.bool,
157
157
  /**
158
158
  * If `true`, the ripple effect is disabled.
159
+ * @default false
159
160
  */
160
161
  disableRipple: PropTypes.bool,
161
162
  /**
@@ -189,6 +190,7 @@ process.env.NODE_ENV !== "production" ? Radio.propTypes /* remove-proptypes */ =
189
190
  onChange: PropTypes.func,
190
191
  /**
191
192
  * If `true`, the `input` element is required.
193
+ * @default false
192
194
  */
193
195
  required: PropTypes.bool,
194
196
  /**
@@ -289,7 +289,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
289
289
  if (!readOnly) {
290
290
  const validKeys = [' ', 'ArrowUp', 'ArrowDown',
291
291
  // The native select doesn't respond to enter on macOS, but it's recommended by
292
- // https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html
292
+ // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
293
293
  'Enter'];
294
294
  if (validKeys.indexOf(event.key) !== -1) {
295
295
  event.preventDefault();
package/Switch/Switch.js CHANGED
@@ -258,6 +258,7 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */
258
258
  disabled: PropTypes.bool,
259
259
  /**
260
260
  * If `true`, the ripple effect is disabled.
261
+ * @default false
261
262
  */
262
263
  disableRipple: PropTypes.bool,
263
264
  /**
@@ -294,6 +295,7 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */
294
295
  onChange: PropTypes.func,
295
296
  /**
296
297
  * If `true`, the `input` element is required.
298
+ * @default false
297
299
  */
298
300
  required: PropTypes.bool,
299
301
  /**
@@ -18,6 +18,7 @@ export interface TabScrollButtonProps extends StandardProps<React.HTMLAttributes
18
18
  direction: 'left' | 'right';
19
19
  /**
20
20
  * If `true`, the component is disabled.
21
+ * @default false
21
22
  */
22
23
  disabled?: boolean;
23
24
  /**
@@ -105,6 +105,7 @@ process.env.NODE_ENV !== "production" ? TabScrollButton.propTypes /* remove-prop
105
105
  direction: PropTypes.oneOf(['left', 'right']).isRequired,
106
106
  /**
107
107
  * If `true`, the component is disabled.
108
+ * @default false
108
109
  */
109
110
  disabled: PropTypes.bool,
110
111
  /**
@@ -193,6 +193,10 @@ const TooltipArrow = styled('span', {
193
193
  }));
194
194
  let hystersisOpen = false;
195
195
  let hystersisTimer = null;
196
+ let cursorPosition = {
197
+ x: 0,
198
+ y: 0
199
+ };
196
200
  export function testReset() {
197
201
  hystersisOpen = false;
198
202
  clearTimeout(hystersisTimer);
@@ -434,17 +438,13 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
434
438
  if (!title && title !== 0) {
435
439
  open = false;
436
440
  }
437
- const positionRef = React.useRef({
438
- x: 0,
439
- y: 0
440
- });
441
441
  const popperRef = React.useRef();
442
442
  const handleMouseMove = event => {
443
443
  const childrenProps = children.props;
444
444
  if (childrenProps.onMouseMove) {
445
445
  childrenProps.onMouseMove(event);
446
446
  }
447
- positionRef.current = {
447
+ cursorPosition = {
448
448
  x: event.clientX,
449
449
  y: event.clientY
450
450
  };
@@ -550,10 +550,10 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
550
550
  placement: placement,
551
551
  anchorEl: followCursor ? {
552
552
  getBoundingClientRect: () => ({
553
- top: positionRef.current.y,
554
- left: positionRef.current.x,
555
- right: positionRef.current.x,
556
- bottom: positionRef.current.y,
553
+ top: cursorPosition.y,
554
+ left: cursorPosition.x,
555
+ right: cursorPosition.x,
556
+ bottom: cursorPosition.y,
557
557
  width: 0,
558
558
  height: 0
559
559
  })
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.11.6
2
+ * @mui/material v5.11.8
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -19,9 +19,13 @@ export interface SwitchBaseProps
19
19
  * The default checked state. Use when the component is not controlled.
20
20
  */
21
21
  defaultChecked?: boolean;
22
+ /**
23
+ * If `true`, the component is disabled.
24
+ */
22
25
  disabled?: boolean;
23
26
  /**
24
27
  * If `true`, the ripple effect is disabled.
28
+ * @default false
25
29
  */
26
30
  disableRipple?: boolean;
27
31
  /**
@@ -65,6 +69,7 @@ export interface SwitchBaseProps
65
69
  readOnly?: boolean;
66
70
  /**
67
71
  * If `true`, the `input` element is required.
72
+ * @default false
68
73
  */
69
74
  required?: boolean;
70
75
  tabIndex?: number;
@@ -72,7 +72,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
72
72
  onChange,
73
73
  onFocus,
74
74
  readOnly,
75
- required,
75
+ required = false,
76
76
  tabIndex,
77
77
  type,
78
78
  value