@mui/lab 5.0.0-alpha.142 → 5.0.0-alpha.143

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 (61) hide show
  1. package/CHANGELOG.md +111 -19
  2. package/LoadingButton/LoadingButton.d.ts +52 -50
  3. package/LoadingButton/LoadingButton.js +1 -1
  4. package/Masonry/Masonry.d.ts +46 -41
  5. package/TabList/TabList.d.ts +14 -12
  6. package/TreeItem/TreeItem.d.ts +4 -85
  7. package/TreeItem/TreeItem.js +17 -375
  8. package/TreeItem/index.d.ts +2 -6
  9. package/TreeItem/index.js +1 -3
  10. package/TreeView/TreeView.d.ts +3 -141
  11. package/TreeView/TreeView.js +17 -824
  12. package/TreeView/index.d.ts +2 -4
  13. package/TreeView/index.js +1 -2
  14. package/index.js +1 -1
  15. package/legacy/LoadingButton/LoadingButton.js +1 -1
  16. package/legacy/TreeItem/TreeItem.js +17 -372
  17. package/legacy/TreeItem/index.js +1 -3
  18. package/legacy/TreeView/TreeView.js +17 -878
  19. package/legacy/TreeView/index.js +1 -2
  20. package/legacy/index.js +1 -1
  21. package/modern/LoadingButton/LoadingButton.js +1 -1
  22. package/modern/TreeItem/TreeItem.js +17 -375
  23. package/modern/TreeItem/index.js +1 -3
  24. package/modern/TreeView/TreeView.js +17 -824
  25. package/modern/TreeView/index.js +1 -2
  26. package/modern/index.js +1 -1
  27. package/node/LoadingButton/LoadingButton.js +1 -1
  28. package/node/TreeItem/TreeItem.js +17 -374
  29. package/node/TreeItem/index.js +9 -21
  30. package/node/TreeView/TreeView.js +17 -824
  31. package/node/TreeView/index.js +8 -18
  32. package/node/index.js +1 -1
  33. package/package.json +5 -4
  34. package/TreeItem/TreeItemContent.d.ts +0 -50
  35. package/TreeItem/TreeItemContent.js +0 -112
  36. package/TreeItem/treeItemClasses.d.ts +0 -24
  37. package/TreeItem/treeItemClasses.js +0 -7
  38. package/TreeItem/useTreeItem.d.ts +0 -11
  39. package/TreeItem/useTreeItem.js +0 -68
  40. package/TreeView/TreeViewContext.js +0 -10
  41. package/TreeView/descendants.js +0 -186
  42. package/TreeView/treeViewClasses.d.ts +0 -8
  43. package/TreeView/treeViewClasses.js +0 -7
  44. package/legacy/TreeItem/TreeItemContent.js +0 -108
  45. package/legacy/TreeItem/treeItemClasses.js +0 -7
  46. package/legacy/TreeItem/useTreeItem.js +0 -67
  47. package/legacy/TreeView/TreeViewContext.js +0 -10
  48. package/legacy/TreeView/descendants.js +0 -193
  49. package/legacy/TreeView/treeViewClasses.js +0 -7
  50. package/modern/TreeItem/TreeItemContent.js +0 -112
  51. package/modern/TreeItem/treeItemClasses.js +0 -7
  52. package/modern/TreeItem/useTreeItem.js +0 -68
  53. package/modern/TreeView/TreeViewContext.js +0 -10
  54. package/modern/TreeView/descendants.js +0 -186
  55. package/modern/TreeView/treeViewClasses.js +0 -7
  56. package/node/TreeItem/TreeItemContent.js +0 -120
  57. package/node/TreeItem/treeItemClasses.js +0 -16
  58. package/node/TreeItem/useTreeItem.js +0 -77
  59. package/node/TreeView/TreeViewContext.js +0 -18
  60. package/node/TreeView/descendants.js +0 -194
  61. package/node/TreeView/treeViewClasses.js +0 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,96 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.14.8
4
+
5
+ <!-- generated comparing v5.14.7..master -->
6
+
7
+ _Sep 5, 2023_
8
+
9
+ A big thanks to the 25 contributors who made this release possible.
10
+
11
+ ### `@mui/material@5.14.8`
12
+
13
+ - &#8203;<!-- 53 -->ImageItemList fix incorrect (below) rendering (#38452) @omriklein
14
+ - &#8203;<!-- 42 -->[Button] Add demo for file upload (#38786) @anle9650
15
+ - &#8203;<!-- 12 -->[Slider] Add missing classes for `Slider` `InputLabel` `InputBase` `Radio` (#38401) @sai6855
16
+ - &#8203;<!-- 11 -->[Select] Merge slotProps.paper with internal Paper props (#38703) @michaldudak
17
+ - &#8203;<!-- 09 -->[Tabs] Fix `ref` type (#38717) @ZeeshanTamboli
18
+ - &#8203;<!-- 08 -->[TabScrollButton] Extend ButtonBase types (#38719) @ZeeshanTamboli
19
+
20
+ ### `@mui/base@5.0.0-beta.14`
21
+
22
+ - &#8203;<!-- 50 -->[Autocomplete] Type multiple values with readonly arrays. (#38253) @pcorpet
23
+ - &#8203;<!-- 07 -->[TextField] Fix unstable height of memoized multiline TextField component (#37135) @amal-qb
24
+
25
+ ### `@mui/joy@5.0.0-beta.5`
26
+
27
+ - &#8203;<!-- 53 -->[Accordion] Fix incorrect display of classname (#38695) @sai6855
28
+ - &#8203;<!-- 51 -->[AspectRatio] Correct `ratio` prop description (#38743) @sai6855
29
+ - &#8203;<!-- 43 -->[Button] Fix disablity of button (#38673) @sai6855
30
+ - &#8203;<!-- 35 -->[design] Stray design tweaks to components (#38476) @zanivan
31
+ - &#8203;<!-- 05 -->[Typography] Added position only when Skeleton is a direct child (#38799) @siriwatknp
32
+
33
+ ### `@mui/lab@5.0.0-alpha.143`
34
+
35
+ - &#8203;<!-- 06 -->[TreeView] Use Tree View from MUI X in the lab (#38261) @flaviendelangle
36
+ - &#8203;<!-- 13 -->[LoadingButton] Fix HTML rule button > div forbidden nesting (#38584) @oliviertassinari
37
+
38
+ ### `@mui/system@5.14.8`
39
+
40
+ - &#8203;<!-- 11 -->[system] Fix the inconsistent types of the `mergeBreakpointsInOrder` function (#38749) @imevanc
41
+ - &#8203;<!-- 10 -->[system] Fix maxWidth incorrectly resolving breakpoints with non-pixel units (#38633) @mj12albert
42
+ - &#8203;<!-- 05 -->[typescript] Introduce \*OwnProps interfaces for components (#36798) @szalonna
43
+
44
+ ### Docs
45
+
46
+ - &#8203;<!-- 52 -->Update changelog (#38704) @mj12albert
47
+ - &#8203;<!-- 49 -->[docs][Autocomplete] Require referentially stable value (#38734) @michaldudak
48
+ - &#8203;<!-- 48 -->[docs][base-ui] Add type parameter to the button in prepareForSlot demo (#38640) @michaldudak
49
+ - &#8203;<!-- 47 -->[docs][base-ui] Fix the broken image in the Tailwind CSS guide (#38721) @michaldudak
50
+ - &#8203;<!-- 46 -->[docs][base-ui]: Working With Tailwind Guide - revises example code to avoid import errors (#38693) @christophermorin
51
+ - &#8203;<!-- 45 -->[docs][base] Add Tailwind CSS + plain CSS demo on the Menu page (#38618) @alisasanib
52
+ - &#8203;<!-- 44 -->[blog] Clearer blog release title @oliviertassinari
53
+ - &#8203;<!-- 43 -->[blog] Add a post for the Tree View migration (#38407) @flaviendelangle
54
+ - &#8203;<!-- 34 -->[docs] Fix broken links to Next.js docs (#38764) @ruflair
55
+ - &#8203;<!-- 33 -->[docs] Trim trailing whitespace (#38793) @oliviertassinari
56
+ - &#8203;<!-- 32 -->[docs] Fix a typo in lab-tree-view-to-mui-x.md @mbrookes
57
+ - &#8203;<!-- 31 -->[docs] Clean up not used Usage files (#38715) @danilo-leal
58
+ - &#8203;<!-- 30 -->[docs] Improve theme builder exceptions (#38709) @jyash97
59
+ - &#8203;<!-- 29 -->[docs] Polish Slider demos (#38759) @oliviertassinari
60
+ - &#8203;<!-- 28 -->[docs] Fix Joy UI docs link regression (#38761) @oliviertassinari
61
+ - &#8203;<!-- 27 -->[docs] Fix typo @oliviertassinari
62
+ - &#8203;<!-- 26 -->[docs] Fix e.g. typo (#38748) @oliviertassinari
63
+ - &#8203;<!-- 25 -->[docs] Fix Next.js pages router example redirect link (#38750) @sai6855
64
+ - &#8203;<!-- 24 -->[docs] Fix SEO issue broken links @oliviertassinari
65
+ - &#8203;<!-- 23 -->[docs] Improve SSR example reference (#38651) @oliviertassinari
66
+ - &#8203;<!-- 17 -->[docs][joy-ui] Integrate a count-up feature to the Linear Progress (#38738) @anon-phantom
67
+ - &#8203;<!-- 16 -->[docs][joy-ui] Fix Link's `overlay` prop demo (#38702) @danilo-leal
68
+ - &#8203;<!-- 15 -->[docs][joy-ui] Polish the Stack page (#38623) @danilo-leal
69
+ - &#8203;<!-- 14 -->[docs][material-ui] Adjust simple Slide demo (#38646) @rajgop1
70
+
71
+ ### Core
72
+
73
+ - &#8203;<!-- 43 -->[core] Re-add nx and setup build caching (#38752) @brijeshb42
74
+ - &#8203;<!-- 41 -->[core] Remove dead code seoTitle @oliviertassinari
75
+ - &#8203;<!-- 40 -->[core] Use immutable refs (#38762) @oliviertassinari
76
+ - &#8203;<!-- 39 -->[core] Rework `typescript-to-proptypes` to share the AST parsing with `parseStyles` (#38517) @flaviendelangle
77
+ - &#8203;<!-- 38 -->[core] Fix CI @oliviertassinari
78
+ - &#8203;<!-- 37 -->[core] Remove unnecessary `@types/webpack` package (#38720) @ZeeshanTamboli
79
+ - &#8203;<!-- 36 -->[core] Remove duplicate prop @oliviertassinari
80
+
81
+ - &#8203;<!-- 22 -->[docs-infra] Fix mobile display in CodeSandbox (#38767) @oliviertassinari
82
+ - &#8203;<!-- 21 -->[docs-infra] Remove legacy GA (#37579) @alexfauquette
83
+ - &#8203;<!-- 20 -->[docs-infra] Fix emotion :first-child console log (#38690) @oliviertassinari
84
+ - &#8203;<!-- 19 -->[docs-infra] Fix leaking callout content (#38712) @danilo-leal
85
+ - &#8203;<!-- 18 -->[docs-infra] Remove emoji from callouts (#38694) @danilo-leal
86
+
87
+ - &#8203;<!-- 04 -->[website] Fix out of date discount value @oliviertassinari
88
+ - &#8203;<!-- 03 -->[website] Fix out-of-date label on Toolpad (#38744) @bharatkashyap
89
+ - &#8203;<!-- 02 -->[website] Fine-tune branding buttons box shadows (#38731) @danilo-leal
90
+ - &#8203;<!-- 01 -->[website] Fix pricing table style (#38681) @alexfauquette
91
+
92
+ All contributors of this release in alphabetical order: @alexfauquette, @alisasanib, @amal-qb, @anle9650, @anon-phantom, @bharatkashyap, @brijeshb42, @christophermorin, @danilo-leal, @flaviendelangle, @imevanc, @jyash97, @mbrookes, @michaldudak, @mj12albert, @oliviertassinari, @omriklein, @pcorpet, @rajgop1, @ruflair, @sai6855, @siriwatknp, @szalonna, @zanivan, @ZeeshanTamboli
93
+
3
94
  ## 5.14.7
4
95
 
5
96
  <!-- generated comparing v5.14.6..master -->
@@ -10,35 +101,36 @@ A big thanks to the 11 contributors who made this release possible. This release
10
101
 
11
102
  ### `@mui/material@5.14.7`
12
103
 
13
- - &#8203;<!-- 17 -->[Autocomplete] Fix listbox opened unexpectedly when component is `disabled` (#38611) @mj12albert
14
- - &#8203;<!-- 03 -->[Select][material-ui] Fix select menu moving on scroll when disableScrollLock is true (#37773) @VishruthR
104
+ - [Autocomplete] Fix listbox opened unexpectedly when component is `disabled` (#38611) @mj12albert
105
+ - [Select][material-ui] Fix select menu moving on scroll when disableScrollLock is true (#37773) @VishruthR
15
106
 
16
107
  ### `@mui/base@5.0.0-beta.13`
17
108
 
18
- - &#8203;<!-- 16 -->[useButton][base-ui] Accept arbitrary props in getRootProps and forward them (#38475) @DiegoAndai
109
+ - [useButton][base-ui] Accept arbitrary props in getRootProps and forward them (#38475) @DiegoAndai
19
110
 
20
111
  ### `@mui/zero-runtime@0.0.1-alpha.1`
21
112
 
22
- - &#8203;<!-- 02 -->[system][zero][tag] Add support for sx prop (#38535) @brijeshb42
113
+ - [system][zero][tag] Add support for sx prop (#38535) @brijeshb42
23
114
 
24
115
  ### Docs
25
116
 
26
- - &#8203;<!-- 10 -->[docs] Number Input docs fixes (#38521) @mj12albert
27
- - &#8203;<!-- 09 -->[docs] Show all the code in the usage section (#38691) @oliviertassinari
28
- - &#8203;<!-- 06 -->[docs][joy-ui] Change the customization and how-to guides docs tree (#38396) @danilo-leal
29
- - &#8203;<!-- 05 -->[docs][lab][LoadingButton] Improve `loading` prop documentation (#38625) @sai6855
30
- - &#8203;<!-- 04 -->[docs][material-ui] Format `key` prop JSDoc description in `Snackbar` component code correctly (#38603) @jaydenseric
117
+ - [docs] Number Input docs fixes (#38521) @mj12albert
118
+ - [docs] Show all the code in the usage section (#38691) @oliviertassinari
119
+ - [docs][joy-ui] Change the customization and how-to guides docs tree (#38396) @danilo-leal
120
+ - [docs][lab][LoadingButton] Improve `loading` prop documentation (#38625) @sai6855
121
+ - [docs][material-ui] Format `key` prop JSDoc description in `Snackbar` component code correctly (#38603) @jaydenseric
31
122
 
32
123
  ### Core
33
124
 
34
- - &#8203;<!-- 15 -->[core] Add use-client to custom icons (#38132) @mj12albert
35
- - &#8203;<!-- 14 -->[core] Remove unnecessary `@types/jsdom` (#38657) @renovate[bot]
36
- - &#8203;<!-- 13 -->[core] Improve sponsors GA labels (#38649) @oliviertassinari
37
- - &#8203;<!-- 12 -->[core] Fix ESM issues with regression tests (#37963) @Janpot
38
- - &#8203;<!-- 11 -->[core] Potential fix for intermittent ci crashes in e2e test (#38614) @Janpot
39
- - &#8203;<!-- 08 -->[docs-infra] Adjust the Material You playground demo design (#38636) @danilo-leal
40
- - &#8203;<!-- 07 -->[docs-infra] Hide the SkipLink button if user prefers reduced motion (#38632) @DerTimonius
41
- - &#8203;<!-- 01 -->[website] Add tiny fixes the homepage Sponsors section (#38635) @danilo-leal
125
+ - [core] Add use-client to custom icons (#38132) @mj12albert
126
+ - [core] Remove unnecessary `@types/jsdom` (#38657) @renovate[bot]
127
+ - [core] Improve sponsors GA labels (#38649) @oliviertassinari
128
+ - [core] Fix ESM issues with regression tests (#37963) @Janpot
129
+ - [core] Potential fix for intermittent ci crashes in e2e test (#38614) @Janpot
130
+ - [docs-infra] Mark unstable components with a chip in the nav drawer (#38573) @michaldudak
131
+ - [docs-infra] Adjust the Material You playground demo design (#38636) @danilo-leal
132
+ - [docs-infra] Hide the SkipLink button if user prefers reduced motion (#38632) @DerTimonius
133
+ - [website] Add tiny fixes the homepage Sponsors section (#38635) @danilo-leal
42
134
 
43
135
  All contributors of this release in alphabetical order: @brijeshb42, @danilo-leal, @DerTimonius, @DiegoAndai, @Janpot, @jaydenseric, @mj12albert, @oliviertassinari, @renovate[bot], @sai6855, @VishruthR
44
136
 
@@ -581,7 +673,7 @@ A big thanks to the 15 contributors who made this release possible. Here are som
581
673
  - 💫 Material UI, Joy UI, and Base UI are compatible with [NextJS App Router](https://nextjs.org/docs/app) (#37656) @mj12albert
582
674
  - 📚 Added new guides for integrating with Next.js 13 App Router (#37656) @mj12albert
583
675
  - Ⓜ️ [Material UI guide](https://mui.com/material-ui/guides/next-js-app-router/)
584
- - 🅙 [Joy UI guide](https://mui.com/joy-ui/guides/next-js-app-router/)
676
+ - 🅙 [Joy UI guide](https://mui.com/joy-ui/integrations/next-js-app-router/)
585
677
  - 🅱️ [Base UI guide](https://mui.com/base-ui/guides/next-js-app-router/)
586
678
  - 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
587
679
 
@@ -10719,7 +10811,7 @@ A big thanks to the 20 contributors who made this release possible. Here are som
10719
10811
  - [Avatar] Fix usage of srcset property (#23286) @matheuspiment
10720
10812
  - [ClickAwayListener] Fix mounting behavior in Portals in React 17 (#23315) @eps1lon
10721
10813
  - [core] Allow React 17 (#23311) @eps1lon
10722
- - [Icon] Fix translation, e.g Google Translate (#23237) @cbeltrangomez84
10814
+ - [Icon] Fix translation, e.g. Google Translate (#23237) @cbeltrangomez84
10723
10815
  - [LinearProgress] Fix Safari's bug during composition of different paint (#23293) @montogeek
10724
10816
  - [Radio] Fix dot misalignment in Safari (#23239) @anasufana
10725
10817
  - [styled-engine] Fix tagged template syntax with multiple expressions (#23269) @eps1lon
@@ -3,55 +3,57 @@ import { OverrideProps } from '@mui/material/OverridableComponent';
3
3
  import { Theme } from '@mui/material/styles';
4
4
  import { SxProps } from '@mui/system';
5
5
 
6
+ export interface LoadingButtonOwnProps {
7
+ /**
8
+ * Override or extend the styles applied to the component.
9
+ */
10
+ classes?: Partial<ButtonClasses> & {
11
+ /** Styles applied to the root element. */
12
+ root?: string;
13
+ /** Styles applied to the root element if `loading={true}`. */
14
+ loading?: string;
15
+ /** Styles applied to the loadingIndicator element. */
16
+ loadingIndicator?: string;
17
+ /** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */
18
+ loadingIndicatorCenter?: string;
19
+ /** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */
20
+ loadingIndicatorStart?: string;
21
+ /** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */
22
+ loadingIndicatorEnd?: string;
23
+ /** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */
24
+ endIconLoadingEnd?: string;
25
+ /** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */
26
+ startIconLoadingStart?: string;
27
+ };
28
+ /**
29
+ * If `true`, the loading indicator is shown and the button becomes disabled.
30
+ * @default false
31
+ */
32
+ loading?: boolean;
33
+ /**
34
+ * Element placed before the children if the button is in loading state.
35
+ * The node should contain an element with `role="progressbar"` with an accessible name.
36
+ * By default we render a `CircularProgress` that is labelled by the button itself.
37
+ * @default <CircularProgress color="inherit" size={16} />
38
+ */
39
+ loadingIndicator?: React.ReactNode;
40
+ /**
41
+ * The loading indicator can be positioned on the start, end, or the center of the button.
42
+ * @default 'center'
43
+ */
44
+ loadingPosition?: 'start' | 'end' | 'center';
45
+ /**
46
+ * The system prop that allows defining system overrides as well as additional CSS styles.
47
+ */
48
+ sx?: SxProps<Theme>;
49
+ }
50
+
6
51
  export type LoadingButtonTypeMap<
7
- P = {},
8
- D extends React.ElementType = 'button',
52
+ AdditionalProps = {},
53
+ RootComponent extends React.ElementType = 'button',
9
54
  > = ExtendButtonTypeMap<{
10
- props: P & {
11
- /**
12
- * Override or extend the styles applied to the component.
13
- */
14
- classes?: Partial<ButtonClasses> & {
15
- /** Styles applied to the root element. */
16
- root?: string;
17
- /** Styles applied to the root element if `loading={true}`. */
18
- loading?: string;
19
- /** Styles applied to the loadingIndicator element. */
20
- loadingIndicator?: string;
21
- /** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */
22
- loadingIndicatorCenter?: string;
23
- /** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */
24
- loadingIndicatorStart?: string;
25
- /** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */
26
- loadingIndicatorEnd?: string;
27
- /** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */
28
- endIconLoadingEnd?: string;
29
- /** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */
30
- startIconLoadingStart?: string;
31
- };
32
- /**
33
- * If `true`, the loading indicator is shown and the button becomes disabled.
34
- * @default false
35
- */
36
- loading?: boolean;
37
- /**
38
- * Element placed before the children if the button is in loading state.
39
- * The node should contain an element with `role="progressbar"` with an accessible name.
40
- * By default we render a `CircularProgress` that is labelled by the button itself.
41
- * @default <CircularProgress color="inherit" size={16} />
42
- */
43
- loadingIndicator?: React.ReactNode;
44
- /**
45
- * The loading indicator can be positioned on the start, end, or the center of the button.
46
- * @default 'center'
47
- */
48
- loadingPosition?: 'start' | 'end' | 'center';
49
- /**
50
- * The system prop that allows defining system overrides as well as additional CSS styles.
51
- */
52
- sx?: SxProps<Theme>;
53
- };
54
- defaultComponent: D;
55
+ props: AdditionalProps & LoadingButtonOwnProps;
56
+ defaultComponent: RootComponent;
55
57
  }>;
56
58
 
57
59
  /**
@@ -68,8 +70,8 @@ export type LoadingButtonTypeMap<
68
70
  declare const LoadingButton: ExtendButton<LoadingButtonTypeMap>;
69
71
 
70
72
  export type LoadingButtonProps<
71
- D extends React.ElementType = LoadingButtonTypeMap['defaultComponent'],
72
- P = {},
73
- > = OverrideProps<LoadingButtonTypeMap<P, D>, D>;
73
+ RootComponent extends React.ElementType = LoadingButtonTypeMap['defaultComponent'],
74
+ AdditionalProps = {},
75
+ > = OverrideProps<LoadingButtonTypeMap<AdditionalProps, RootComponent>, RootComponent>;
74
76
 
75
77
  export default LoadingButton;
@@ -75,7 +75,7 @@ const LoadingButtonRoot = styled(Button, {
75
75
  marginLeft: -8
76
76
  }
77
77
  }));
78
- const LoadingButtonLoadingIndicator = styled('div', {
78
+ const LoadingButtonLoadingIndicator = styled('span', {
79
79
  name: 'MuiLoadingButton',
80
80
  slot: 'LoadingIndicator',
81
81
  overridesResolver: (props, styles) => {
@@ -3,44 +3,49 @@ import { OverridableComponent, OverrideProps } from '@mui/material/OverridableCo
3
3
  import { Theme } from '@mui/material/styles';
4
4
  import { MasonryClasses } from './masonryClasses';
5
5
 
6
- export interface MasonryTypeMap<P = {}, D extends React.ElementType = 'div'> {
7
- props: P & {
8
- /**
9
- * The content of the component.
10
- */
11
- children: NonNullable<React.ReactNode>;
12
- /**
13
- * Override or extend the styles applied to the component.
14
- */
15
- classes?: Partial<MasonryClasses>;
16
- /**
17
- * Number of columns.
18
- * @default 4
19
- */
20
- columns?: ResponsiveStyleValue<number | string>;
21
- /**
22
- * The default number of columns of the component. This is provided for server-side rendering.
23
- */
24
- defaultColumns?: number;
25
- /**
26
- * The default height of the component in px. This is provided for server-side rendering.
27
- */
28
- defaultHeight?: number;
29
- /**
30
- * The default spacing of the component. Like `spacing`, it is a factor of the theme's spacing. This is provided for server-side rendering.
31
- */
32
- defaultSpacing?: number;
33
- /**
34
- * Defines the space between children. It is a factor of the theme's spacing.
35
- * @default 1
36
- */
37
- spacing?: ResponsiveStyleValue<number | string>;
38
- /**
39
- * Allows defining system overrides as well as additional CSS styles.
40
- */
41
- sx?: SxProps<Theme>;
42
- };
43
- defaultComponent: D;
6
+ export interface MasonryOwnProps {
7
+ /**
8
+ * The content of the component.
9
+ */
10
+ children: NonNullable<React.ReactNode>;
11
+ /**
12
+ * Override or extend the styles applied to the component.
13
+ */
14
+ classes?: Partial<MasonryClasses>;
15
+ /**
16
+ * Number of columns.
17
+ * @default 4
18
+ */
19
+ columns?: ResponsiveStyleValue<number | string>;
20
+ /**
21
+ * The default number of columns of the component. This is provided for server-side rendering.
22
+ */
23
+ defaultColumns?: number;
24
+ /**
25
+ * The default height of the component in px. This is provided for server-side rendering.
26
+ */
27
+ defaultHeight?: number;
28
+ /**
29
+ * The default spacing of the component. Like `spacing`, it is a factor of the theme's spacing. This is provided for server-side rendering.
30
+ */
31
+ defaultSpacing?: number;
32
+ /**
33
+ * Defines the space between children. It is a factor of the theme's spacing.
34
+ * @default 1
35
+ */
36
+ spacing?: ResponsiveStyleValue<number | string>;
37
+ /**
38
+ * Allows defining system overrides as well as additional CSS styles.
39
+ */
40
+ sx?: SxProps<Theme>;
41
+ }
42
+
43
+ export interface MasonryTypeMap<
44
+ AdditionalProps = {},
45
+ RootComponent extends React.ElementType = 'div',
46
+ > {
47
+ props: AdditionalProps & MasonryOwnProps;
48
+ defaultComponent: RootComponent;
44
49
  }
45
50
  /**
46
51
  *
@@ -55,8 +60,8 @@ export interface MasonryTypeMap<P = {}, D extends React.ElementType = 'div'> {
55
60
  declare const Masonry: OverridableComponent<MasonryTypeMap>;
56
61
 
57
62
  export type MasonryProps<
58
- D extends React.ElementType = MasonryTypeMap['defaultComponent'],
59
- P = {},
60
- > = OverrideProps<MasonryTypeMap<P, D>, D>;
63
+ RootComponent extends React.ElementType = MasonryTypeMap['defaultComponent'],
64
+ AdditionalProps = {},
65
+ > = OverrideProps<MasonryTypeMap<AdditionalProps, RootComponent>, RootComponent>;
61
66
 
62
67
  export default Masonry;
@@ -3,17 +3,19 @@ import { TabsTypeMap } from '@mui/material/Tabs';
3
3
  import { DistributiveOmit } from '@mui/types';
4
4
  import { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
5
5
 
6
+ interface TabListOwnProps extends DistributiveOmit<TabsTypeMap['props'], 'children' | 'value'> {
7
+ /**
8
+ * A list of `<Tab />` elements.
9
+ */
10
+ children?: React.ReactNode;
11
+ }
12
+
6
13
  export interface TabListTypeMap<
7
- P = {},
8
- D extends React.ElementType = TabsTypeMap['defaultComponent'],
14
+ AdditionalProps = {},
15
+ RootComponent extends React.ElementType = TabsTypeMap['defaultComponent'],
9
16
  > {
10
- props: P & {
11
- /**
12
- * A list of `<Tab />` elements.
13
- */
14
- children?: React.ReactNode;
15
- } & DistributiveOmit<TabsTypeMap['props'], 'children' | 'value'>;
16
- defaultComponent: D;
17
+ props: AdditionalProps & TabListOwnProps;
18
+ defaultComponent: RootComponent;
17
19
  }
18
20
 
19
21
  /**
@@ -32,8 +34,8 @@ declare const TabList: OverridableComponent<TabListTypeMap>;
32
34
  export type TabListClassKey = keyof NonNullable<TabListTypeMap['props']['classes']>;
33
35
 
34
36
  export type TabListProps<
35
- D extends React.ElementType = TabListTypeMap['defaultComponent'],
36
- P = {},
37
- > = OverrideProps<TabListTypeMap<P, D>, D>;
37
+ RootComponent extends React.ElementType = TabListTypeMap['defaultComponent'],
38
+ AdditionalProps = {},
39
+ > = OverrideProps<TabListTypeMap<AdditionalProps, RootComponent>, RootComponent>;
38
40
 
39
41
  export default TabList;
@@ -1,88 +1,7 @@
1
1
  import * as React from 'react';
2
- import { InternalStandardProps as StandardProps, Theme } from '@mui/material';
3
- import { TransitionProps } from '@mui/material/transitions';
4
- import { SxProps } from '@mui/system';
5
- import { TreeItemContentProps } from './TreeItemContent';
6
- import { TreeItemClasses } from './treeItemClasses';
7
-
8
- export interface TreeItemProps
9
- extends StandardProps<React.HTMLAttributes<HTMLLIElement>, 'onFocus'> {
10
- /**
11
- * The content of the component.
12
- */
13
- children?: React.ReactNode;
14
- /**
15
- * Override or extend the styles applied to the component.
16
- */
17
- classes?: Partial<TreeItemClasses>;
18
- /**
19
- * The icon used to collapse the node.
20
- */
21
- collapseIcon?: React.ReactNode;
22
- /**
23
- * The component used for the content node.
24
- * @default TreeItemContent
25
- */
26
- ContentComponent?: React.JSXElementConstructor<TreeItemContentProps>;
27
- /**
28
- * Props applied to ContentComponent
29
- */
30
- ContentProps?: React.HTMLAttributes<HTMLElement>;
31
- /**
32
- * If `true`, the node is disabled.
33
- * @default false
34
- */
35
- disabled?: boolean;
36
- /**
37
- * The icon displayed next to a end node.
38
- */
39
- endIcon?: React.ReactNode;
40
- /**
41
- * The icon used to expand the node.
42
- */
43
- expandIcon?: React.ReactNode;
44
- /**
45
- * The icon to display next to the tree node's label.
46
- */
47
- icon?: React.ReactNode;
48
- /**
49
- * This prop isn't supported.
50
- * Use the `onNodeFocus` callback on the tree if you need to monitor a node's focus.
51
- */
52
- onFocus?: null;
53
- /**
54
- * The tree node label.
55
- */
56
- label?: React.ReactNode;
57
- /**
58
- * The id of the node.
59
- */
60
- nodeId: string;
61
- /**
62
- * The component used for the transition.
63
- * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
64
- * @default Collapse
65
- */
66
- TransitionComponent?: React.JSXElementConstructor<TransitionProps>;
67
- /**
68
- * Props applied to the transition element.
69
- * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
70
- */
71
- TransitionProps?: TransitionProps;
72
- /**
73
- * The system prop that allows defining system overrides as well as additional CSS styles.
74
- */
75
- sx?: SxProps<Theme>;
76
- }
77
-
2
+ import { TreeItemProps } from '@mui/x-tree-view/TreeItem';
78
3
  /**
79
- *
80
- * Demos:
81
- *
82
- * - [Tree View](https://mui.com/material-ui/react-tree-view/)
83
- *
84
- * API:
85
- *
86
- * - [TreeItem API](https://mui.com/material-ui/api/tree-item/)
4
+ * @ignore - do not document.
87
5
  */
88
- export default function TreeItem(props: TreeItemProps): JSX.Element;
6
+ declare const TreeItem: React.ForwardRefExoticComponent<Omit<TreeItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
7
+ export default TreeItem;