@mui/material 5.14.0 → 5.14.1

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 (54) hide show
  1. package/Button/Button.js +1 -1
  2. package/CHANGELOG.md +94 -3
  3. package/Card/Card.d.ts +2 -2
  4. package/CssBaseline/CssBaseline.js +2 -2
  5. package/Dialog/Dialog.d.ts +1 -1
  6. package/Drawer/Drawer.d.ts +1 -1
  7. package/Fab/Fab.js +1 -1
  8. package/FormControlLabel/FormControlLabel.js +11 -6
  9. package/Link/Link.d.ts +9 -7
  10. package/ListItem/ListItem.js +1 -1
  11. package/ListItemButton/ListItemButton.js +1 -1
  12. package/MenuItem/MenuItem.js +1 -1
  13. package/OverridableComponent.d.ts +7 -0
  14. package/Paper/Paper.d.ts +32 -30
  15. package/Paper/index.d.ts +1 -1
  16. package/Popover/Popover.d.ts +1 -1
  17. package/Slider/SliderValueLabel.d.ts +1 -6
  18. package/SvgIcon/SvgIcon.js +9 -9
  19. package/Typography/Typography.d.ts +66 -65
  20. package/index.js +1 -1
  21. package/legacy/Button/Button.js +1 -1
  22. package/legacy/CssBaseline/CssBaseline.js +2 -2
  23. package/legacy/Fab/Fab.js +1 -1
  24. package/legacy/FormControlLabel/FormControlLabel.js +11 -6
  25. package/legacy/ListItem/ListItem.js +1 -1
  26. package/legacy/ListItemButton/ListItemButton.js +1 -1
  27. package/legacy/MenuItem/MenuItem.js +1 -1
  28. package/legacy/SvgIcon/SvgIcon.js +9 -9
  29. package/legacy/index.js +1 -1
  30. package/legacy/useTouchRipple/useTouchRipple.js +2 -2
  31. package/modern/Button/Button.js +1 -1
  32. package/modern/Fab/Fab.js +1 -1
  33. package/modern/FormControlLabel/FormControlLabel.js +11 -6
  34. package/modern/ListItem/ListItem.js +1 -1
  35. package/modern/ListItemButton/ListItemButton.js +1 -1
  36. package/modern/MenuItem/MenuItem.js +1 -1
  37. package/modern/index.js +1 -1
  38. package/node/Button/Button.js +1 -1
  39. package/node/CssBaseline/CssBaseline.js +2 -2
  40. package/node/Fab/Fab.js +1 -1
  41. package/node/FormControlLabel/FormControlLabel.js +11 -6
  42. package/node/ListItem/ListItem.js +1 -1
  43. package/node/ListItemButton/ListItemButton.js +1 -1
  44. package/node/MenuItem/MenuItem.js +1 -1
  45. package/node/SvgIcon/SvgIcon.js +9 -9
  46. package/node/index.js +1 -1
  47. package/node/useTouchRipple/useTouchRipple.js +2 -2
  48. package/package.json +6 -6
  49. package/styles/components.d.ts +5 -0
  50. package/styles/overrides.d.ts +2 -0
  51. package/styles/props.d.ts +1 -1
  52. package/umd/material-ui.development.js +98 -93
  53. package/umd/material-ui.production.min.js +13 -13
  54. package/useTouchRipple/useTouchRipple.js +2 -2
package/Button/Button.js CHANGED
@@ -307,7 +307,7 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */
307
307
  * The component used for the root node.
308
308
  * Either a string to use a HTML element or a component.
309
309
  */
310
- component: PropTypes.elementType,
310
+ component: PropTypes /* @typescript-to-proptypes-ignore */.elementType,
311
311
  /**
312
312
  * If `true`, the component is disabled.
313
313
  * @default false
package/CHANGELOG.md CHANGED
@@ -1,5 +1,96 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.14.1
4
+
5
+ <!-- generated comparing v5.14.0..master -->
6
+
7
+ _Jul 19, 2023_
8
+
9
+ A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 💫 Introducing some new components for Joy UI:
12
+ - [Skeleton](https://mui.com/joy-ui/react-skeleton/) component (#37893) @siriwatknp
13
+ - [ToggleButton](https://mui.com/joy-ui/react-toggle-button-group/) (#37716) @siriwatknp
14
+ - 🎉 Base UI has its own [landing page](https://www.mui.com/base-ui)!
15
+ - 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
16
+
17
+ ### `@mui/material@5.14.1`
18
+
19
+ - &#8203;<!-- 14 -->[FormControlLabel] Fix misplaced asterisk when `labelPlacement` is provided (#37831) @ZeeshanTamboli
20
+ - &#8203;<!-- 11 -->[Slider][material] Fix type dependency on @types/prop-types (#37853) @Methuselah96
21
+ - &#8203;<!-- 10 -->[Menu] Add MuiMenuList to createTheme components key (#37956) @mj12albert
22
+ - &#8203;<!-- 09 -->[Modal] Remove deprecated `BackdropComponent` and `BackdropProps` from tests (#38018) @sai6855
23
+
24
+ ### `@mui/material-next@6.0.0-alpha.93`
25
+
26
+ - &#8203;<!-- 54 -->[Slider][material-next] Add use client directive to useSliderElementsOverlap (#37955) @mj12albert
27
+ - &#8203;<!-- 47 -->[Button][material-next] Fix some event handlers being ignored (#37647) @DiegoAndai
28
+
29
+ ### `@mui/base@5.0.0-beta.8`
30
+
31
+ - &#8203;<!-- 53 -->[Autocomplete] Make touch and click behavior on an option consistent (#37972) @divyammadhok
32
+
33
+ ### `@mui/joy@5.0.0-alpha.88`
34
+
35
+ - &#8203;<!-- 13 -->[Joy][Select] Fix type error caused by custom variant (#37996) @OmPr366
36
+ - &#8203;<!-- 12 -->[ToggleButton][Joy] Add `ToggleButton` component (#37716) @siriwatknp
37
+ - &#8203;<!-- 07 -->[Skeleton] Add Joy UI `Skeleton` component (#37893) @siriwatknp
38
+
39
+ ### `@mui/utils@5.14.1`
40
+
41
+ - &#8203;<!-- 06 -->[utils] Add function overload for `useEventCallback` (#37827) @cherniavskii
42
+
43
+ ### Docs
44
+
45
+ - &#8203;<!-- 52 -->[docs][base] Add Tailwind CSS & plain CSS demo on the form control page (#37914) @mnajdova
46
+ - &#8203;<!-- 51 -->[docs][base] Make Base UI Select demos denser (#37836) @zanivan
47
+ - &#8203;<!-- 38 -->[docs] Link Material UI from the landing page (#37971) @oliviertassinari
48
+ - &#8203;<!-- 37 -->[docs] Fix the empty /components page (#38010) @brijeshb42
49
+ - &#8203;<!-- 36 -->[docs] Checkout template follows user's color scheme preference (#37928) @OndrejHj04
50
+ - &#8203;<!-- 35 -->[docs] Disable ad for onboarding pages (#37998) @oliviertassinari
51
+ - &#8203;<!-- 34 -->[docs] Fix broken link to Base UI Next.js App Router (#37973) @oliviertassinari
52
+ - &#8203;<!-- 33 -->[docs] Fix typo in next-js-app-router.md (#37974) @ericbrian
53
+ - &#8203;<!-- 32 -->[docs] Add pnpm commands to Material UI Installation page (#36650) @officialrajdeepsingh
54
+ - &#8203;<!-- 31 -->[docs] Link charts in the roadmap (#37944) @oliviertassinari
55
+ - &#8203;<!-- 30 -->[docs] Improve changelog @oliviertassinari
56
+ - &#8203;<!-- 29 -->[docs] Improve the Select docs (#37279) @michaldudak
57
+ - &#8203;<!-- 16 -->[docs][menu] Add Tailwind CSS & plain CSS demo on the Menu page (#37856) @mnajdova
58
+ - &#8203;<!-- 15 -->[example] Update EmotionCacheProvider to work with GlobalStyles (#37962) @siriwatknp
59
+
60
+ ### Core
61
+
62
+ - &#8203;<!-- 50 -->[blog] Add blog post about support for Next.js App Router (#37929) @samuelsycamore
63
+ - &#8203;<!-- 49 -->[blog] Blog MUI X pro statement removed (#38015) @prakhargupta1
64
+ - &#8203;<!-- 48 -->[blog] Add Toolpad beta announcement blog (#37799) @prakhargupta1
65
+ - &#8203;<!-- 46 -->[core] Increase space available for sidenav @oliviertassinari
66
+ - &#8203;<!-- 45 -->[core] Adds `component` prop to `OverrideProps` type (#35924) @sai6855
67
+ - &#8203;<!-- 44 -->[core] Fix rsc build step in CI (#38019) @mj12albert
68
+ - &#8203;<!-- 43 -->[core] Remove nx dependency (#37964) @Janpot
69
+ - &#8203;<!-- 42 -->[core] Lock `@types/node` to v18 (#37965) @ZeeshanTamboli
70
+ - &#8203;<!-- 41 -->[core] Update priority support issue template and prompt (#37824) @DanailH
71
+ - &#8203;<!-- 40 -->[core] Remove warnings in docs:api (#37858) @alexfauquette
72
+ - &#8203;<!-- 39 -->[core] Make rimraf work after a major update (#37930) @michaldudak
73
+ - &#8203;<!-- 28 -->[docs-infra] Change the Diamond Sponsor block positioning on the side nav (#37933) @danilo-leal
74
+ - &#8203;<!-- 27 -->[docs-infra] Support backticks in the codeblocks (#37950) @cherniavskii
75
+ - &#8203;<!-- 26 -->[docs-infra] Improve performance hideToolbar: true (#37969) @oliviertassinari
76
+ - &#8203;<!-- 25 -->[docs-infra] Fix button label on mobile (#37997) @oliviertassinari
77
+ - &#8203;<!-- 24 -->[docs-infra] Square drawer corners (#37970) @oliviertassinari
78
+ - &#8203;<!-- 23 -->[docs-infra] Improve tab contrast in codeblock (#38000) @oliviertassinari
79
+ - &#8203;<!-- 22 -->[docs-infra] Fix API generation for Base UI (#37941) @oliviertassinari
80
+ - &#8203;<!-- 21 -->[docs-infra] Fix layout shift on xGrid (#37954) @oliviertassinari
81
+ - &#8203;<!-- 20 -->[docs-infra] Update installation commands to use the new tabs code component (#37927) @danilo-leal
82
+ - &#8203;<!-- 19 -->[docs-infra] Improve disableToc={true} support (#37931) @oliviertassinari
83
+ - &#8203;<!-- 18 -->[docs-infra] Remove icons and tweak the design of the side nav (#37860) @danilo-leal
84
+ - &#8203;<!-- 17 -->[docs-infra] Fix TypeScrit error in demo export (#37830) @oliviertassinari
85
+ - &#8203;<!-- 08 -->[notifications] Add notification for first Charts release (#37679) @joserodolfofreitas
86
+ - &#8203;<!-- 05 -->[website] Add Base UI marketing page (#36622) @siriwatknp
87
+ - &#8203;<!-- 04 -->[website] Update MUI X landing page (#37966) @cherniavskii
88
+ - &#8203;<!-- 03 -->[website] Fix a11y issues (#37999) @oliviertassinari
89
+ - &#8203;<!-- 02 -->[website] Make the Core page refer to group of products (#37608) @danilo-leal
90
+ - &#8203;<!-- 01 -->[website] Add perpetual option to pricing page (#35504) @joserodolfofreitas
91
+
92
+ All contributors of this release in alphabetical order: @alexfauquette, @brijeshb42, @cherniavskii, @DanailH, @danilo-leal, @DiegoAndai, @divyammadhok, @ericbrian, @Janpot, @joserodolfofreitas, @Methuselah96, @michaldudak, @mj12albert, @mnajdova, @officialrajdeepsingh, @oliviertassinari, @OmPr366, @OndrejHj04, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @zanivan, @ZeeshanTamboli
93
+
3
94
  ## 5.14.0
4
95
 
5
96
  <!-- generated comparing v5.13.7..master -->
@@ -34,8 +125,8 @@ A big thanks to the 15 contributors who made this release possible. Here are som
34
125
 
35
126
  ### Docs
36
127
 
37
- - [docs] Polish ukraine banner (#37905) @oliviertassinari
38
- - [docs] Reduce ukraine banner size (#34795) @oliviertassinari
128
+ - [docs] Polish Ukraine banner (#37905) @oliviertassinari
129
+ - [docs] Reduce Ukraine banner size (#34795) @oliviertassinari
39
130
  - [docs] Add callouts about controlled vs uncontrolled components in Core docs (#37849) @samuelsycamore
40
131
  - [docs] Add missing Portal elements to Tailwind CSS interoperability guide (#37807) @enrique-ramirez
41
132
  - [docs] Small pickers migration improvement (#37815) @alexfauquette
@@ -10006,7 +10097,7 @@ _Nov 14, 2020_
10006
10097
  A big thanks to the 34 contributors who made this release possible. Here are some highlights ✨:
10007
10098
 
10008
10099
  - 📅 Migrate the date picker to the lab (#22692) @dmtrKovalenko.
10009
- We have integrated the components with the code infrastructure. Next we will migrate all the GitHub issues from [material-ui-pickers](https://github.com/mui/material-ui-pickers) and archive the repository. This migration will help provide first-class support for the date picker components. The component will stay in the lab as long as necessary to reach the high quality bar we have for core components. You can find the [new documentation here](https://mui.com/components/pickers/).
10100
+ We have integrated the components with the code infrastructure. Next we will migrate all the GitHub issues from [material-ui-pickers](https://github.com/mui/material-ui-pickers) and archive the repository. This migration will help provide first-class support for the date picker components. The component will stay in the lab as long as necessary to reach the high-quality bar we have for core components. You can find the [new documentation here](https://mui.com/components/pickers/).
10010
10101
 
10011
10102
  While the source code is currently hosted in the [main repository](https://github.com/mui/material-ui), we might move it to the [x repository](https://github.com/mui/mui-x) in the future, depending on what is easier for the commercial date range picker. The date picker will stay open source no matter what.
10012
10103
 
package/Card/Card.d.ts CHANGED
@@ -3,7 +3,7 @@ import { SxProps } from '@mui/system';
3
3
  import { DistributiveOmit } from '@mui/types';
4
4
  import { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
5
5
  import { Theme } from '..';
6
- import { PaperProps } from '../Paper';
6
+ import { PaperOwnProps } from '../Paper';
7
7
  import { CardClasses } from './cardClasses';
8
8
 
9
9
  // TODO: v6 remove this interface, it is not used
@@ -11,7 +11,7 @@ export interface CardPropsColorOverrides {}
11
11
 
12
12
  export interface CardTypeMap<P = {}, D extends React.ElementType = 'div'> {
13
13
  props: P &
14
- DistributiveOmit<PaperProps, 'classes'> & {
14
+ DistributiveOmit<PaperOwnProps, 'classes'> & {
15
15
  /**
16
16
  * Override or extend the styles applied to the component.
17
17
  */
@@ -30,7 +30,7 @@ export const body = theme => _extends({
30
30
  }
31
31
  });
32
32
  export const styles = (theme, enableColorScheme = false) => {
33
- var _theme$components, _theme$components$Mui;
33
+ var _theme$components;
34
34
  const colorSchemeStyles = {};
35
35
  if (enableColorScheme && theme.colorSchemes) {
36
36
  Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
@@ -58,7 +58,7 @@ export const styles = (theme, enableColorScheme = false) => {
58
58
  }
59
59
  })
60
60
  }, colorSchemeStyles);
61
- const themeOverrides = (_theme$components = theme.components) == null ? void 0 : (_theme$components$Mui = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components$Mui.styleOverrides;
61
+ const themeOverrides = (_theme$components = theme.components) == null || (_theme$components = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components.styleOverrides;
62
62
  if (themeOverrides) {
63
63
  defaultStyles = [defaultStyles, themeOverrides];
64
64
  }
@@ -72,7 +72,7 @@ export interface DialogProps extends StandardProps<ModalProps, 'children'> {
72
72
  * Props applied to the [`Paper`](/material-ui/api/paper/) element.
73
73
  * @default {}
74
74
  */
75
- PaperProps?: Partial<PaperProps>;
75
+ PaperProps?: Partial<PaperProps<React.ElementType>>;
76
76
  /**
77
77
  * Determine the container for scrolling the dialog.
78
78
  * @default 'paper'
@@ -46,7 +46,7 @@ export interface DrawerProps extends StandardProps<ModalProps, 'open' | 'childre
46
46
  * Props applied to the [`Paper`](/material-ui/api/paper/) element.
47
47
  * @default {}
48
48
  */
49
- PaperProps?: Partial<PaperProps>;
49
+ PaperProps?: Partial<PaperProps<React.ElementType>>;
50
50
  /**
51
51
  * Props applied to the [`Slide`](/material-ui/api/slide/) element.
52
52
  */
package/Fab/Fab.js CHANGED
@@ -186,7 +186,7 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes /* remove-proptypes */ = {
186
186
  * The component used for the root node.
187
187
  * Either a string to use a HTML element or a component.
188
188
  */
189
- component: PropTypes.elementType,
189
+ component: PropTypes /* @typescript-to-proptypes-ignore */.elementType,
190
190
  /**
191
191
  * If `true`, the component is disabled.
192
192
  * @default false
@@ -9,6 +9,7 @@ import clsx from 'clsx';
9
9
  import { refType } from '@mui/utils';
10
10
  import { unstable_composeClasses as composeClasses } from '@mui/base';
11
11
  import { useFormControl } from '../FormControl';
12
+ import Stack from '../Stack';
12
13
  import Typography from '../Typography';
13
14
  import capitalize from '../utils/capitalize';
14
15
  import styled from '../styles/styled';
@@ -150,12 +151,16 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
150
151
  ownerState: ownerState,
151
152
  ref: ref
152
153
  }, other, {
153
- children: [/*#__PURE__*/React.cloneElement(control, controlProps), label, required && /*#__PURE__*/_jsxs(AsteriskComponent, {
154
- ownerState: ownerState,
155
- "aria-hidden": true,
156
- className: classes.asterisk,
157
- children: ["\u2009", '*']
158
- })]
154
+ children: [/*#__PURE__*/React.cloneElement(control, controlProps), required ? /*#__PURE__*/_jsxs(Stack, {
155
+ direction: "row",
156
+ alignItems: "center",
157
+ children: [label, /*#__PURE__*/_jsxs(AsteriskComponent, {
158
+ ownerState: ownerState,
159
+ "aria-hidden": true,
160
+ className: classes.asterisk,
161
+ children: ["\u2009", '*']
162
+ })]
163
+ }) : label]
159
164
  }));
160
165
  });
161
166
  process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-proptypes */ = {
package/Link/Link.d.ts CHANGED
@@ -3,12 +3,12 @@ import { DistributiveOmit } from '@mui/types';
3
3
  import { SxProps } from '@mui/system';
4
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
5
  import { Theme } from '../styles';
6
- import { TypographyProps } from '../Typography';
6
+ import { TypographyOwnProps } from '../Typography';
7
7
  import { LinkClasses } from './linkClasses';
8
8
 
9
9
  export interface LinkTypeMap<P = {}, D extends React.ElementType = 'a'> {
10
10
  props: P &
11
- DistributiveOmit<LinkBaseProps, 'classes'> & {
11
+ LinkBaseProps & {
12
12
  /**
13
13
  * The content of the component.
14
14
  */
@@ -21,7 +21,7 @@ export interface LinkTypeMap<P = {}, D extends React.ElementType = 'a'> {
21
21
  * The color of the link.
22
22
  * @default 'primary'
23
23
  */
24
- color?: TypographyProps['color'];
24
+ color?: TypographyOwnProps['color'];
25
25
  /**
26
26
  * The system prop that allows defining system overrides as well as additional CSS styles.
27
27
  */
@@ -29,7 +29,7 @@ export interface LinkTypeMap<P = {}, D extends React.ElementType = 'a'> {
29
29
  /**
30
30
  * `classes` prop applied to the [`Typography`](/material-ui/api/typography/) element.
31
31
  */
32
- TypographyClasses?: TypographyProps['classes'];
32
+ TypographyClasses?: TypographyOwnProps['classes'];
33
33
  /**
34
34
  * Controls when the link should have an underline.
35
35
  * @default 'always'
@@ -39,7 +39,7 @@ export interface LinkTypeMap<P = {}, D extends React.ElementType = 'a'> {
39
39
  * Applies the theme typography styles.
40
40
  * @default 'inherit'
41
41
  */
42
- variant?: TypographyProps['variant'];
42
+ variant?: TypographyOwnProps['variant'];
43
43
  };
44
44
  defaultComponent: D;
45
45
  }
@@ -58,8 +58,10 @@ export interface LinkTypeMap<P = {}, D extends React.ElementType = 'a'> {
58
58
  */
59
59
  declare const Link: OverridableComponent<LinkTypeMap>;
60
60
 
61
- export type LinkBaseProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> &
62
- DistributiveOmit<TypographyProps, 'children' | 'component' | 'color' | 'ref' | 'variant'>;
61
+ export type LinkBaseProps = DistributiveOmit<
62
+ TypographyOwnProps,
63
+ 'children' | 'color' | 'variant' | 'classes'
64
+ >;
63
65
 
64
66
  export type LinkProps<
65
67
  D extends React.ElementType = LinkTypeMap['defaultComponent'],
@@ -314,7 +314,7 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes /* remove-proptypes *
314
314
  * The component used for the root node.
315
315
  * Either a string to use a HTML element or a component.
316
316
  */
317
- component: PropTypes.elementType,
317
+ component: PropTypes /* @typescript-to-proptypes-ignore */.elementType,
318
318
  /**
319
319
  * The components used for each slot inside.
320
320
  *
@@ -193,7 +193,7 @@ process.env.NODE_ENV !== "production" ? ListItemButton.propTypes /* remove-propt
193
193
  * The component used for the root node.
194
194
  * Either a string to use a HTML element or a component.
195
195
  */
196
- component: PropTypes.elementType,
196
+ component: PropTypes /* @typescript-to-proptypes-ignore */.elementType,
197
197
  /**
198
198
  * If `true`, compact vertical padding designed for keyboard and mouse input is used.
199
199
  * The prop defaults to the value inherited from the parent List component.
@@ -209,7 +209,7 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes /* remove-proptypes *
209
209
  * The component used for the root node.
210
210
  * Either a string to use a HTML element or a component.
211
211
  */
212
- component: PropTypes.elementType,
212
+ component: PropTypes /* @typescript-to-proptypes-ignore */.elementType,
213
213
  /**
214
214
  * If `true`, compact vertical padding designed for keyboard and mouse input is used.
215
215
  * The prop defaults to the value inherited from the parent Menu component.
@@ -34,6 +34,13 @@ export type OverrideProps<
34
34
  > = (
35
35
  & BaseProps<M>
36
36
  & DistributiveOmit<React.ComponentPropsWithRef<C>, keyof BaseProps<M>>
37
+ & {
38
+ /**
39
+ * The component used for the root node.
40
+ * Either a string to use a HTML element or a component.
41
+ */
42
+ component?: C
43
+ }
37
44
  );
38
45
 
39
46
  /**
package/Paper/Paper.d.ts CHANGED
@@ -7,37 +7,39 @@ import { PaperClasses } from './paperClasses';
7
7
 
8
8
  export interface PaperPropsVariantOverrides {}
9
9
 
10
+ export interface PaperOwnProps {
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<PaperClasses>;
19
+ /**
20
+ * Shadow depth, corresponds to `dp` in the spec.
21
+ * It accepts values between 0 and 24 inclusive.
22
+ * @default 1
23
+ */
24
+ elevation?: number;
25
+ /**
26
+ * If `true`, rounded corners are disabled.
27
+ * @default false
28
+ */
29
+ square?: boolean;
30
+ /**
31
+ * The system prop that allows defining system overrides as well as additional CSS styles.
32
+ */
33
+ sx?: SxProps<Theme>;
34
+ /**
35
+ * The variant to use.
36
+ * @default 'elevation'
37
+ */
38
+ variant?: OverridableStringUnion<'elevation' | 'outlined', PaperPropsVariantOverrides>;
39
+ }
40
+
10
41
  export interface PaperTypeMap<P = {}, D extends React.ElementType = 'div'> {
11
- props: P & {
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<PaperClasses>;
20
- /**
21
- * Shadow depth, corresponds to `dp` in the spec.
22
- * It accepts values between 0 and 24 inclusive.
23
- * @default 1
24
- */
25
- elevation?: number;
26
- /**
27
- * If `true`, rounded corners are disabled.
28
- * @default false
29
- */
30
- square?: boolean;
31
- /**
32
- * The system prop that allows defining system overrides as well as additional CSS styles.
33
- */
34
- sx?: SxProps<Theme>;
35
- /**
36
- * The variant to use.
37
- * @default 'elevation'
38
- */
39
- variant?: OverridableStringUnion<'elevation' | 'outlined', PaperPropsVariantOverrides>;
40
- };
42
+ props: P & PaperOwnProps;
41
43
  defaultComponent: D;
42
44
  }
43
45
 
package/Paper/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { default } from './Paper';
2
- export type { PaperProps, PaperPropsVariantOverrides, PaperTypeMap } from './Paper';
2
+ export type { PaperProps, PaperPropsVariantOverrides, PaperTypeMap, PaperOwnProps } from './Paper';
3
3
 
4
4
  export { default as paperClasses } from './paperClasses';
5
5
  export * from './paperClasses';
@@ -107,7 +107,7 @@ export interface PopoverProps
107
107
  *
108
108
  * @default {}
109
109
  */
110
- PaperProps?: Partial<PaperProps>;
110
+ PaperProps?: Partial<PaperProps<React.ElementType>>;
111
111
  /**
112
112
  * The components used for each slot inside.
113
113
  *
@@ -1,15 +1,10 @@
1
1
  import * as React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import { SliderValueLabelProps } from './SliderValueLabel.types';
4
3
  /**
5
4
  * @ignore - internal component.
6
5
  */
7
6
  declare function SliderValueLabel(props: SliderValueLabelProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
8
7
  declare namespace SliderValueLabel {
9
- var propTypes: {
10
- children: PropTypes.Validator<PropTypes.ReactElementLike>;
11
- className: PropTypes.Requireable<string>;
12
- value: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
- };
8
+ var propTypes: any;
14
9
  }
15
10
  export default SliderValueLabel;
@@ -37,7 +37,7 @@ const SvgIconRoot = styled('svg', {
37
37
  theme,
38
38
  ownerState
39
39
  }) => {
40
- var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$transitions2$d, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette$ownerState$c2, _palette2, _palette2$action, _palette3, _palette3$action;
40
+ var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;
41
41
  return {
42
42
  userSelect: 'none',
43
43
  width: '1em',
@@ -47,19 +47,19 @@ const SvgIconRoot = styled('svg', {
47
47
  // e.g. heroicons uses fill="none" and stroke="currentColor"
48
48
  fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
49
49
  flexShrink: 0,
50
- transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
51
- duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
50
+ transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
51
+ duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter
52
52
  }),
53
53
  fontSize: {
54
54
  inherit: 'inherit',
55
- small: ((_theme$typography = theme.typography) == null ? void 0 : (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
56
- medium: ((_theme$typography2 = theme.typography) == null ? void 0 : (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
57
- large: ((_theme$typography3 = theme.typography) == null ? void 0 : (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'
55
+ small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
56
+ medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
57
+ large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'
58
58
  }[ownerState.fontSize],
59
59
  // TODO v5 deprecate, v6 remove for sx
60
- color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null ? void 0 : (_palette$ownerState$c2 = _palette[ownerState.color]) == null ? void 0 : _palette$ownerState$c2.main) != null ? _palette$ownerState$c : {
61
- action: (_palette2 = (theme.vars || theme).palette) == null ? void 0 : (_palette2$action = _palette2.action) == null ? void 0 : _palette2$action.active,
62
- disabled: (_palette3 = (theme.vars || theme).palette) == null ? void 0 : (_palette3$action = _palette3.action) == null ? void 0 : _palette3$action.disabled,
60
+ color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {
61
+ action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,
62
+ disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,
63
63
  inherit: undefined
64
64
  }[ownerState.color]
65
65
  };
@@ -8,72 +8,73 @@ import { TypographyClasses } from './typographyClasses';
8
8
 
9
9
  export interface TypographyPropsVariantOverrides {}
10
10
 
11
+ export interface TypographyOwnProps extends SystemProps<Theme> {
12
+ /**
13
+ * Set the text-align on the component.
14
+ * @default 'inherit'
15
+ */
16
+ align?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
17
+ /**
18
+ * The content of the component.
19
+ */
20
+ children?: React.ReactNode;
21
+ /**
22
+ * Override or extend the styles applied to the component.
23
+ */
24
+ classes?: Partial<TypographyClasses>;
25
+ /**
26
+ * If `true`, the text will have a bottom margin.
27
+ * @default false
28
+ */
29
+ gutterBottom?: boolean;
30
+ /**
31
+ * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
32
+ *
33
+ * Note that text overflow can only happen with block or inline-block level elements
34
+ * (the element needs to have a width in order to overflow).
35
+ * @default false
36
+ */
37
+ noWrap?: boolean;
38
+ /**
39
+ * If `true`, the element will be a paragraph element.
40
+ * @default false
41
+ */
42
+ paragraph?: boolean;
43
+ /**
44
+ * The system prop that allows defining system overrides as well as additional CSS styles.
45
+ */
46
+ sx?: SxProps<Theme>;
47
+ /**
48
+ * Applies the theme typography styles.
49
+ * @default 'body1'
50
+ */
51
+ variant?: OverridableStringUnion<Variant | 'inherit', TypographyPropsVariantOverrides>;
52
+ /**
53
+ * The component maps the variant prop to a range of different HTML element types.
54
+ * For instance, subtitle1 to `<h6>`.
55
+ * If you wish to change that mapping, you can provide your own.
56
+ * Alternatively, you can use the `component` prop.
57
+ * @default {
58
+ * h1: 'h1',
59
+ * h2: 'h2',
60
+ * h3: 'h3',
61
+ * h4: 'h4',
62
+ * h5: 'h5',
63
+ * h6: 'h6',
64
+ * subtitle1: 'h6',
65
+ * subtitle2: 'h6',
66
+ * body1: 'p',
67
+ * body2: 'p',
68
+ * inherit: 'p',
69
+ * }
70
+ */
71
+ variantMapping?: Partial<
72
+ Record<OverridableStringUnion<Variant | 'inherit', TypographyPropsVariantOverrides>, string>
73
+ >;
74
+ }
75
+
11
76
  export interface TypographyTypeMap<P = {}, D extends React.ElementType = 'span'> {
12
- props: P &
13
- SystemProps<Theme> & {
14
- /**
15
- * Set the text-align on the component.
16
- * @default 'inherit'
17
- */
18
- align?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
19
- /**
20
- * The content of the component.
21
- */
22
- children?: React.ReactNode;
23
- /**
24
- * Override or extend the styles applied to the component.
25
- */
26
- classes?: Partial<TypographyClasses>;
27
- /**
28
- * If `true`, the text will have a bottom margin.
29
- * @default false
30
- */
31
- gutterBottom?: boolean;
32
- /**
33
- * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
34
- *
35
- * Note that text overflow can only happen with block or inline-block level elements
36
- * (the element needs to have a width in order to overflow).
37
- * @default false
38
- */
39
- noWrap?: boolean;
40
- /**
41
- * If `true`, the element will be a paragraph element.
42
- * @default false
43
- */
44
- paragraph?: boolean;
45
- /**
46
- * The system prop that allows defining system overrides as well as additional CSS styles.
47
- */
48
- sx?: SxProps<Theme>;
49
- /**
50
- * Applies the theme typography styles.
51
- * @default 'body1'
52
- */
53
- variant?: OverridableStringUnion<Variant | 'inherit', TypographyPropsVariantOverrides>;
54
- /**
55
- * The component maps the variant prop to a range of different HTML element types.
56
- * For instance, subtitle1 to `<h6>`.
57
- * If you wish to change that mapping, you can provide your own.
58
- * Alternatively, you can use the `component` prop.
59
- * @default {
60
- * h1: 'h1',
61
- * h2: 'h2',
62
- * h3: 'h3',
63
- * h4: 'h4',
64
- * h5: 'h5',
65
- * h6: 'h6',
66
- * subtitle1: 'h6',
67
- * subtitle2: 'h6',
68
- * body1: 'p',
69
- * body2: 'p',
70
- * inherit: 'p',
71
- * }
72
- */
73
- variantMapping?: Partial<
74
- Record<OverridableStringUnion<Variant | 'inherit', TypographyPropsVariantOverrides>, string>
75
- >;
76
- };
77
+ props: P & TypographyOwnProps;
77
78
  defaultComponent: D;
78
79
  }
79
80
 
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.14.0
2
+ * @mui/material v5.14.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -307,7 +307,7 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */
307
307
  * The component used for the root node.
308
308
  * Either a string to use a HTML element or a component.
309
309
  */
310
- component: PropTypes.elementType,
310
+ component: PropTypes /* @typescript-to-proptypes-ignore */.elementType,
311
311
  /**
312
312
  * If `true`, the component is disabled.
313
313
  * @default false
@@ -35,7 +35,7 @@ export var body = function body(theme) {
35
35
  });
36
36
  };
37
37
  var _styles = function styles(theme) {
38
- var _theme$components, _theme$components$Mui;
38
+ var _theme$components;
39
39
  var enableColorScheme = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
40
40
  var colorSchemeStyles = {};
41
41
  if (enableColorScheme && theme.colorSchemes) {
@@ -67,7 +67,7 @@ var _styles = function styles(theme) {
67
67
  }
68
68
  })
69
69
  }, colorSchemeStyles);
70
- var themeOverrides = (_theme$components = theme.components) == null ? void 0 : (_theme$components$Mui = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components$Mui.styleOverrides;
70
+ var themeOverrides = (_theme$components = theme.components) == null || (_theme$components = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components.styleOverrides;
71
71
  if (themeOverrides) {
72
72
  defaultStyles = [defaultStyles, themeOverrides];
73
73
  }