@mui/material 5.11.5 → 5.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/Box/Box.d.ts +3 -2
  2. package/Button/Button.js +0 -2
  3. package/CHANGELOG.md +160 -0
  4. package/Checkbox/Checkbox.d.ts +3 -0
  5. package/Checkbox/Checkbox.js +3 -0
  6. package/FormLabel/FormLabel.d.ts +51 -45
  7. package/InputLabel/InputLabel.d.ts +70 -57
  8. package/Radio/Radio.js +2 -0
  9. package/Slider/Slider.d.ts +215 -35
  10. package/Slider/Slider.js +7 -7
  11. package/Slider/SliderValueLabel.d.ts +1 -1
  12. package/Slider/SliderValueLabel.js +3 -0
  13. package/Slider/SliderValueLabel.types.d.ts +1 -1
  14. package/Slider/index.d.ts +2 -0
  15. package/Slider/index.js +2 -1
  16. package/Slider/sliderClasses.d.ts +40 -11
  17. package/Slider/sliderClasses.js +5 -3
  18. package/SwipeableDrawer/SwipeableDrawer.d.ts +15 -0
  19. package/SwipeableDrawer/SwipeableDrawer.js +48 -17
  20. package/Switch/Switch.js +2 -0
  21. package/TabScrollButton/TabScrollButton.d.ts +1 -0
  22. package/TabScrollButton/TabScrollButton.js +1 -0
  23. package/Tooltip/Tooltip.js +9 -9
  24. package/index.js +1 -1
  25. package/internal/SwitchBase.d.ts +5 -0
  26. package/internal/SwitchBase.js +1 -1
  27. package/legacy/Button/Button.js +0 -2
  28. package/legacy/Checkbox/Checkbox.js +3 -0
  29. package/legacy/Radio/Radio.js +2 -0
  30. package/legacy/Slider/Slider.js +7 -7
  31. package/legacy/Slider/SliderValueLabel.js +3 -0
  32. package/legacy/Slider/index.js +2 -1
  33. package/legacy/Slider/sliderClasses.js +5 -3
  34. package/legacy/SwipeableDrawer/SwipeableDrawer.js +50 -17
  35. package/legacy/Switch/Switch.js +2 -0
  36. package/legacy/TabScrollButton/TabScrollButton.js +1 -0
  37. package/legacy/Tooltip/Tooltip.js +9 -9
  38. package/legacy/index.js +1 -1
  39. package/legacy/internal/SwitchBase.js +2 -1
  40. package/legacy/styles/CssVarsProvider.js +3 -1
  41. package/modern/Button/Button.js +0 -2
  42. package/modern/Checkbox/Checkbox.js +3 -0
  43. package/modern/Radio/Radio.js +2 -0
  44. package/modern/Slider/Slider.js +7 -7
  45. package/modern/Slider/SliderValueLabel.js +3 -0
  46. package/modern/Slider/index.js +2 -1
  47. package/modern/Slider/sliderClasses.js +5 -3
  48. package/modern/SwipeableDrawer/SwipeableDrawer.js +47 -17
  49. package/modern/Switch/Switch.js +2 -0
  50. package/modern/TabScrollButton/TabScrollButton.js +1 -0
  51. package/modern/Tooltip/Tooltip.js +9 -9
  52. package/modern/index.js +1 -1
  53. package/modern/internal/SwitchBase.js +1 -1
  54. package/modern/styles/CssVarsProvider.js +3 -1
  55. package/node/Button/Button.js +0 -2
  56. package/node/Checkbox/Checkbox.js +3 -0
  57. package/node/Radio/Radio.js +2 -0
  58. package/node/Slider/Slider.js +6 -6
  59. package/node/Slider/SliderValueLabel.js +3 -0
  60. package/node/Slider/index.js +12 -2
  61. package/node/Slider/sliderClasses.js +6 -3
  62. package/node/SwipeableDrawer/SwipeableDrawer.js +48 -17
  63. package/node/Switch/Switch.js +2 -0
  64. package/node/TabScrollButton/TabScrollButton.js +1 -0
  65. package/node/Tooltip/Tooltip.js +9 -9
  66. package/node/index.js +1 -1
  67. package/node/internal/SwitchBase.js +1 -1
  68. package/node/styles/CssVarsProvider.js +3 -1
  69. package/package.json +5 -5
  70. package/styles/CssVarsProvider.js +3 -1
  71. package/umd/material-ui.development.js +121 -58
  72. package/umd/material-ui.production.min.js +20 -20
package/Box/Box.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { createBox, BoxTypeMap } from '@mui/system';
1
+ import { BoxTypeMap } from '@mui/system';
2
+ import { OverridableComponent } from '@mui/types';
2
3
  import { OverrideProps } from '../OverridableComponent';
3
4
  import { Theme as MaterialTheme } from '../styles';
4
5
 
@@ -12,7 +13,7 @@ import { Theme as MaterialTheme } from '../styles';
12
13
  *
13
14
  * - [Box API](https://mui.com/material-ui/api/box/)
14
15
  */
15
- declare const Box: ReturnType<typeof createBox<MaterialTheme>>;
16
+ declare const Box: OverridableComponent<BoxTypeMap<{}, 'div', MaterialTheme>>;
16
17
 
17
18
  export type BoxProps<
18
19
  D extends React.ElementType = BoxTypeMap['defaultComponent'],
package/Button/Button.js CHANGED
@@ -113,8 +113,6 @@ const ButtonRoot = styled(ButtonBase, {
113
113
  color: (theme.vars || theme).palette.action.disabled
114
114
  }, ownerState.variant === 'outlined' && {
115
115
  border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
116
- }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
117
- border: `1px solid ${(theme.vars || theme).palette.action.disabled}`
118
116
  }, ownerState.variant === 'contained' && {
119
117
  color: (theme.vars || theme).palette.action.disabled,
120
118
  boxShadow: (theme.vars || theme).shadows[0],
package/CHANGELOG.md CHANGED
@@ -1,5 +1,165 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.11.7
4
+
5
+ <!-- generated comparing v5.11.6..master -->
6
+
7
+ _Jan 31, 2023_
8
+
9
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - @siriwatknp added `Table` component to Joy UI (#35872)
12
+ - many other 🐛 bug fixes and 📚 documentation improvements
13
+
14
+ ### `@mui/material@5.11.7`
15
+
16
+ - &#8203;<!-- 30 -->[Autocomplete] Prevent reset scroll position when new options are added (#35735) @sai6855
17
+ - &#8203;<!-- 24 -->[CssVarsProvider] Skip `unstable_sxConfig` variables (#35932) @siriwatknp
18
+ - &#8203;<!-- 10 -->[InputLabel] Add missing `component` type (#35852) @sai6855
19
+ - &#8203;<!-- 05 -->[Tooltip] Fix tooltip position (#35909) @marktoman
20
+
21
+ ### `@mui/base@5.0.0-alpha.116`
22
+
23
+ - &#8203;<!-- 29 -->[ListboxUnstyled] Fix option state highlighted to prevent unnecessary focus (#35838) @SaidMarar
24
+
25
+ ### `@mui/joy@5.0.0-alpha.65`
26
+
27
+ #### Breaking changes
28
+
29
+ - &#8203;<!-- 05 -->[Joy] Replace `Joy[Component]` classname with `Mui[Component]` classname for all slots of components (#35718) @hbjORbj
30
+
31
+ - Renames the classname prefix of all Joy UI components from `'Joy'` to `'Mui'`.
32
+
33
+ ```diff
34
+ <Button
35
+ -sx={{ '& .JoyButton-root': { '& .JoyButton-button': {} } }}
36
+ +sx={{ '& .MuiButton-root': { '& .MuiButton-button': {} } }}
37
+ />
38
+ ```
39
+
40
+ 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.
41
+
42
+ - &#8203;<!-- 04 -->[Joy] Replace `row` prop with `orientation` prop in all Joy UI components (#35721) @hbjORbj
43
+
44
+ - Transforms `row` prop to `orientation` prop across `Card`, `List` and `RadioGroup` components in Joy UI.
45
+
46
+ ```diff
47
+ <Card
48
+ -row
49
+ +orientation={"horizontal"}
50
+ />
51
+ ```
52
+
53
+ 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.
54
+
55
+ #### Changes
56
+
57
+ - &#8203;<!-- 26 -->[Joy][Checkbox] Display correct icon in checkbox (#35943) @sai6855
58
+ - &#8203;<!-- 09 -->[Joy] Add `Table` component (#35872) @siriwatknp
59
+ - &#8203;<!-- 08 -->[Joy] Miscellaneous fixes (#35953) @siriwatknp
60
+
61
+ ### Docs
62
+
63
+ - &#8203;<!-- 28 -->[blog] Add RSS feed (#35777) @gorjiali
64
+ - &#8203;<!-- 27 -->[blog] Prevent horizontal scroll on blog posts (#35948) @oliviertassinari
65
+ - &#8203;<!-- 23 -->[docs] Add to codemod README about an added script (#35999) @hbjORbj
66
+ - &#8203;<!-- 22 -->[docs] Add a warning about to clear the local storage when `defaultMode` changes (#35937) @ArthurPedroti
67
+ - &#8203;<!-- 21 -->[docs] Fix Joy UI variables playground (#35950) @siriwatknp
68
+ - &#8203;<!-- 20 -->[docs] Fix typos in base components docs (#35985) @HeVictor
69
+ - &#8203;<!-- 19 -->[docs] Fix event's label reported to GA (#35930) @oliviertassinari
70
+ - &#8203;<!-- 18 -->[docs] Standardize "no longer" / "not documented" callouts in Material UI docs (#35957) @samuelsycamore
71
+ - &#8203;<!-- 17 -->[docs] Revise and expand Joy UI Checkbox doc (#35817) @samuelsycamore
72
+ - &#8203;<!-- 16 -->[docs] Add docs notification to Date and Time Pickers revamped (#35935) @joserodolfofreitas
73
+ - &#8203;<!-- 15 -->[docs] Update community theme builder to forked updated one (#35928) @idebeijer
74
+ - &#8203;<!-- 14 -->[docs] Add Joy default theme viewer (#35554) @siriwatknp
75
+ - &#8203;<!-- 13 -->[docs][joy] Fixed a typo in `Using icon libraries` page (#35989) @badalsaibo
76
+ - &#8203;<!-- 12 -->[docs][joy] Removed Badge info from Chip docs (#35955) @Vivek-Prajapatii
77
+ - &#8203;<!-- 11 -->[docs][system] Fix border color of Boxes in demos of `Configure the sx prop` page in dark mode (#35961) @ZeeshanTamboli
78
+
79
+ ### Core
80
+
81
+ - &#8203;<!-- 25 -->[core] Boolean props always have a default value of `false` in API docs (#35913) @hbjORbj
82
+ - &#8203;<!-- 04 -->[core] Improve types for usePreviousProps (#35833) @sai6855
83
+ - &#8203;<!-- 03 -->[website] Fix 404 link to store (#35973) @oliviertassinari
84
+ - &#8203;<!-- 02 -->[website] Fix 302 of diamond sponsor link @oliviertassinari
85
+ - &#8203;<!-- 01 -->[website] Fix outdated YouTube link @oliviertassinari
86
+
87
+ All contributors of this release in alphabetical order: @ArthurPedroti, @badalsaibo, @gorjiali, @hbjORbj, @HeVictor, @idebeijer, @joserodolfofreitas, @marktoman, @oliviertassinari, @sai6855, @SaidMarar, @samuelsycamore, @siriwatknp, @Vivek-Prajapatii, @ZeeshanTamboli
88
+
89
+ ## 5.11.6
90
+
91
+ <!-- generated comparing v5.11.5..master -->
92
+
93
+ _Jan 23, 2023_
94
+
95
+ A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
96
+
97
+ - @ZeeshanTamboli improved the logic for handling the value label in the `SliderUnstyled` (#35805)
98
+ - many other 🐛 bug fixes and 📚 documentation improvements
99
+
100
+ ### `@mui/material@5.11.6`
101
+
102
+ - &#8203;<!-- 15 -->[Box] Fix usage of not supported features in TypeScript 3.5 (#35877) @mnajdova
103
+ - &#8203;<!-- 14 -->[Button] Fix border color for secondary disabled button (#35866) @SaidMarar
104
+ - &#8203;<!-- 03 -->[SwipeableDrawer] Add callback to customise touchstart ignore for swipeable drawer (#30759) @tech-meppem
105
+
106
+ ### `@mui/base@5.0.0-alpha.115`
107
+
108
+ #### Breaking changes
109
+
110
+ - &#8203;<!-- 04 -->[SliderUnstyled] Improved logic for displaying the value label (#35805) @ZeeshanTamboli
111
+
112
+ - The `valueLabelDisplay` prop is removed from `SliderUnstyled`. The prop was not working as intended in `SliderUnstyled` (See #35398). You can instead provide a `valueLabel` slot with the `slots` prop API to show the value label:
113
+
114
+ ```diff
115
+ - <SliderUnstyled valueLabelDisplay="on" />
116
+ + <SliderUnstyled slots={{ valueLabel: SliderValueLabel }} />
117
+ ```
118
+
119
+ The following demo shows how to show a value label when it is hovered over with the thumb: https://mui.com/base/react-slider/#value-label
120
+
121
+ - The following classes are removed from `sliderUnstyledClasses` since they are not needed for the value label:
122
+
123
+ ```diff
124
+ - valueLabel
125
+ - valueLabelOpen
126
+ - valueLabelCircle
127
+ - valueLabelLabel
128
+ ```
129
+
130
+ In the custom value label component, you can define your own classNames and target them with CSS.
131
+
132
+ - The `SliderValueLabelUnstyled` component is removed from SliderUnstyled. You should provide your own custom component for the value label.
133
+
134
+ - To avoid using `React.cloneElement` API in value label, the component hierarchy structure of the value label is changed. The value label is now inside the Thumb slot - `Thumb` -> `Input`, `ValueLabel`.
135
+
136
+ #### Changes
137
+
138
+ - &#8203;<!-- 05 -->[InputUnstyled] Fix externally provided `inputRef` is ignored (#35807) @sai6855
139
+
140
+ ### `@mui/joy@5.0.0-alpha.64`
141
+
142
+ - &#8203;<!-- 17 -->[Avatar][joy] Remove `imgProps` prop and add Codemod script for migration (#35859) @hbjORbj
143
+
144
+ ### Docs
145
+
146
+ - &#8203;<!-- 16 -->[blog] Date and time pickers revamped (#35486) @joserodolfofreitas
147
+ - &#8203;<!-- 10 -->[docs] Fix incorrect breakpoint use (#34948) @rosita-dmello
148
+ - &#8203;<!-- 09 -->[docs] Replace react-virtualized with react-virtuoso in Table (#35700) @petyosi
149
+ - &#8203;<!-- 08 -->[docs] Fix account menu demo not closing with keyboard. (#35870) @mj12albert
150
+ - &#8203;<!-- 07 -->[docs] Fix typos in the docs of Joy UI (#35876) @HeVictor
151
+ - &#8203;<!-- 06 -->[docs] Fix wording in `Color` page (#35873) @oliv37
152
+
153
+ ### Core
154
+
155
+ - &#8203;<!-- 13 -->[core] Fix release changelog to handle commits with empty author field (#35921) @mnajdova
156
+ - &#8203;<!-- 12 -->[core] Revert `docs-utilities` migration to TypeScript and fix type (#35881) @ZeeshanTamboli
157
+ - &#8203;<!-- 11 -->[core] Migrate internal `docs-utilities` package to TypeScript (#35846) @ZeeshanTamboli
158
+ - &#8203;<!-- 02 -->[website] Designer don't spend their time writing code @oliviertassinari
159
+ - &#8203;<!-- 01 -->[website] Emphasis the technical background need for this role @oliviertassinari
160
+
161
+ All contributors of this release in alphabetical order: @HeVictor, @hbjORbj, @joserodolfofreitas, @mj12albert, @mnajdova, @oliv37, @oliviertassinari, @petyosi, @rosita-dmello, @sai6855, @SaidMarar, @tech-meppem, @ZeeshanTamboli
162
+
3
163
  ## 5.11.5
4
164
 
5
165
  <!-- generated comparing v5.11.4..master -->
@@ -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
+ 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;
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
  /**