@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.
- package/Box/Box.d.ts +3 -2
- package/Button/Button.js +0 -2
- package/CHANGELOG.md +160 -0
- package/Checkbox/Checkbox.d.ts +3 -0
- package/Checkbox/Checkbox.js +3 -0
- package/FormLabel/FormLabel.d.ts +51 -45
- package/InputLabel/InputLabel.d.ts +70 -57
- package/Radio/Radio.js +2 -0
- package/Slider/Slider.d.ts +215 -35
- package/Slider/Slider.js +7 -7
- package/Slider/SliderValueLabel.d.ts +1 -1
- package/Slider/SliderValueLabel.js +3 -0
- package/Slider/SliderValueLabel.types.d.ts +1 -1
- package/Slider/index.d.ts +2 -0
- package/Slider/index.js +2 -1
- package/Slider/sliderClasses.d.ts +40 -11
- package/Slider/sliderClasses.js +5 -3
- package/SwipeableDrawer/SwipeableDrawer.d.ts +15 -0
- package/SwipeableDrawer/SwipeableDrawer.js +48 -17
- package/Switch/Switch.js +2 -0
- package/TabScrollButton/TabScrollButton.d.ts +1 -0
- package/TabScrollButton/TabScrollButton.js +1 -0
- package/Tooltip/Tooltip.js +9 -9
- package/index.js +1 -1
- package/internal/SwitchBase.d.ts +5 -0
- package/internal/SwitchBase.js +1 -1
- package/legacy/Button/Button.js +0 -2
- package/legacy/Checkbox/Checkbox.js +3 -0
- package/legacy/Radio/Radio.js +2 -0
- package/legacy/Slider/Slider.js +7 -7
- package/legacy/Slider/SliderValueLabel.js +3 -0
- package/legacy/Slider/index.js +2 -1
- package/legacy/Slider/sliderClasses.js +5 -3
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +50 -17
- package/legacy/Switch/Switch.js +2 -0
- package/legacy/TabScrollButton/TabScrollButton.js +1 -0
- package/legacy/Tooltip/Tooltip.js +9 -9
- package/legacy/index.js +1 -1
- package/legacy/internal/SwitchBase.js +2 -1
- package/legacy/styles/CssVarsProvider.js +3 -1
- package/modern/Button/Button.js +0 -2
- package/modern/Checkbox/Checkbox.js +3 -0
- package/modern/Radio/Radio.js +2 -0
- package/modern/Slider/Slider.js +7 -7
- package/modern/Slider/SliderValueLabel.js +3 -0
- package/modern/Slider/index.js +2 -1
- package/modern/Slider/sliderClasses.js +5 -3
- package/modern/SwipeableDrawer/SwipeableDrawer.js +47 -17
- package/modern/Switch/Switch.js +2 -0
- package/modern/TabScrollButton/TabScrollButton.js +1 -0
- package/modern/Tooltip/Tooltip.js +9 -9
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +1 -1
- package/modern/styles/CssVarsProvider.js +3 -1
- package/node/Button/Button.js +0 -2
- package/node/Checkbox/Checkbox.js +3 -0
- package/node/Radio/Radio.js +2 -0
- package/node/Slider/Slider.js +6 -6
- package/node/Slider/SliderValueLabel.js +3 -0
- package/node/Slider/index.js +12 -2
- package/node/Slider/sliderClasses.js +6 -3
- package/node/SwipeableDrawer/SwipeableDrawer.js +48 -17
- package/node/Switch/Switch.js +2 -0
- package/node/TabScrollButton/TabScrollButton.js +1 -0
- package/node/Tooltip/Tooltip.js +9 -9
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +1 -1
- package/node/styles/CssVarsProvider.js +3 -1
- package/package.json +5 -5
- package/styles/CssVarsProvider.js +3 -1
- package/umd/material-ui.development.js +121 -58
- package/umd/material-ui.production.min.js +20 -20
package/Box/Box.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
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:
|
|
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
|
+
- ​<!-- 30 -->[Autocomplete] Prevent reset scroll position when new options are added (#35735) @sai6855
|
|
17
|
+
- ​<!-- 24 -->[CssVarsProvider] Skip `unstable_sxConfig` variables (#35932) @siriwatknp
|
|
18
|
+
- ​<!-- 10 -->[InputLabel] Add missing `component` type (#35852) @sai6855
|
|
19
|
+
- ​<!-- 05 -->[Tooltip] Fix tooltip position (#35909) @marktoman
|
|
20
|
+
|
|
21
|
+
### `@mui/base@5.0.0-alpha.116`
|
|
22
|
+
|
|
23
|
+
- ​<!-- 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
|
+
- ​<!-- 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
|
+
- ​<!-- 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
|
+
- ​<!-- 26 -->[Joy][Checkbox] Display correct icon in checkbox (#35943) @sai6855
|
|
58
|
+
- ​<!-- 09 -->[Joy] Add `Table` component (#35872) @siriwatknp
|
|
59
|
+
- ​<!-- 08 -->[Joy] Miscellaneous fixes (#35953) @siriwatknp
|
|
60
|
+
|
|
61
|
+
### Docs
|
|
62
|
+
|
|
63
|
+
- ​<!-- 28 -->[blog] Add RSS feed (#35777) @gorjiali
|
|
64
|
+
- ​<!-- 27 -->[blog] Prevent horizontal scroll on blog posts (#35948) @oliviertassinari
|
|
65
|
+
- ​<!-- 23 -->[docs] Add to codemod README about an added script (#35999) @hbjORbj
|
|
66
|
+
- ​<!-- 22 -->[docs] Add a warning about to clear the local storage when `defaultMode` changes (#35937) @ArthurPedroti
|
|
67
|
+
- ​<!-- 21 -->[docs] Fix Joy UI variables playground (#35950) @siriwatknp
|
|
68
|
+
- ​<!-- 20 -->[docs] Fix typos in base components docs (#35985) @HeVictor
|
|
69
|
+
- ​<!-- 19 -->[docs] Fix event's label reported to GA (#35930) @oliviertassinari
|
|
70
|
+
- ​<!-- 18 -->[docs] Standardize "no longer" / "not documented" callouts in Material UI docs (#35957) @samuelsycamore
|
|
71
|
+
- ​<!-- 17 -->[docs] Revise and expand Joy UI Checkbox doc (#35817) @samuelsycamore
|
|
72
|
+
- ​<!-- 16 -->[docs] Add docs notification to Date and Time Pickers revamped (#35935) @joserodolfofreitas
|
|
73
|
+
- ​<!-- 15 -->[docs] Update community theme builder to forked updated one (#35928) @idebeijer
|
|
74
|
+
- ​<!-- 14 -->[docs] Add Joy default theme viewer (#35554) @siriwatknp
|
|
75
|
+
- ​<!-- 13 -->[docs][joy] Fixed a typo in `Using icon libraries` page (#35989) @badalsaibo
|
|
76
|
+
- ​<!-- 12 -->[docs][joy] Removed Badge info from Chip docs (#35955) @Vivek-Prajapatii
|
|
77
|
+
- ​<!-- 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
|
+
- ​<!-- 25 -->[core] Boolean props always have a default value of `false` in API docs (#35913) @hbjORbj
|
|
82
|
+
- ​<!-- 04 -->[core] Improve types for usePreviousProps (#35833) @sai6855
|
|
83
|
+
- ​<!-- 03 -->[website] Fix 404 link to store (#35973) @oliviertassinari
|
|
84
|
+
- ​<!-- 02 -->[website] Fix 302 of diamond sponsor link @oliviertassinari
|
|
85
|
+
- ​<!-- 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
|
+
- ​<!-- 15 -->[Box] Fix usage of not supported features in TypeScript 3.5 (#35877) @mnajdova
|
|
103
|
+
- ​<!-- 14 -->[Button] Fix border color for secondary disabled button (#35866) @SaidMarar
|
|
104
|
+
- ​<!-- 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
|
+
- ​<!-- 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
|
+
- ​<!-- 05 -->[InputUnstyled] Fix externally provided `inputRef` is ignored (#35807) @sai6855
|
|
139
|
+
|
|
140
|
+
### `@mui/joy@5.0.0-alpha.64`
|
|
141
|
+
|
|
142
|
+
- ​<!-- 17 -->[Avatar][joy] Remove `imgProps` prop and add Codemod script for migration (#35859) @hbjORbj
|
|
143
|
+
|
|
144
|
+
### Docs
|
|
145
|
+
|
|
146
|
+
- ​<!-- 16 -->[blog] Date and time pickers revamped (#35486) @joserodolfofreitas
|
|
147
|
+
- ​<!-- 10 -->[docs] Fix incorrect breakpoint use (#34948) @rosita-dmello
|
|
148
|
+
- ​<!-- 09 -->[docs] Replace react-virtualized with react-virtuoso in Table (#35700) @petyosi
|
|
149
|
+
- ​<!-- 08 -->[docs] Fix account menu demo not closing with keyboard. (#35870) @mj12albert
|
|
150
|
+
- ​<!-- 07 -->[docs] Fix typos in the docs of Joy UI (#35876) @HeVictor
|
|
151
|
+
- ​<!-- 06 -->[docs] Fix wording in `Color` page (#35873) @oliv37
|
|
152
|
+
|
|
153
|
+
### Core
|
|
154
|
+
|
|
155
|
+
- ​<!-- 13 -->[core] Fix release changelog to handle commits with empty author field (#35921) @mnajdova
|
|
156
|
+
- ​<!-- 12 -->[core] Revert `docs-utilities` migration to TypeScript and fix type (#35881) @ZeeshanTamboli
|
|
157
|
+
- ​<!-- 11 -->[core] Migrate internal `docs-utilities` package to TypeScript (#35846) @ZeeshanTamboli
|
|
158
|
+
- ​<!-- 02 -->[website] Designer don't spend their time writing code @oliviertassinari
|
|
159
|
+
- ​<!-- 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 -->
|
package/Checkbox/Checkbox.d.ts
CHANGED
|
@@ -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
|
/**
|
package/Checkbox/Checkbox.js
CHANGED
|
@@ -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
|
/**
|
package/FormLabel/FormLabel.d.ts
CHANGED
|
@@ -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 {
|
|
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
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
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
|
/**
|