@mui/system 5.10.17 → 5.11.0

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 (110) hide show
  1. package/Box/Box.spec.d.ts +1 -1
  2. package/CHANGELOG.md +74 -0
  3. package/Container/Container.d.ts +13 -13
  4. package/Container/ContainerProps.d.ts +40 -40
  5. package/Container/containerClasses.d.ts +22 -22
  6. package/Container/createContainer.d.ts +18 -18
  7. package/Stack/Stack.d.ts +13 -13
  8. package/Stack/StackProps.d.ts +42 -42
  9. package/Stack/createStack.d.ts +21 -21
  10. package/Stack/index.d.ts +5 -5
  11. package/Stack/stackClasses.d.ts +8 -8
  12. package/Unstable_Grid/Grid.d.ts +12 -12
  13. package/Unstable_Grid/GridProps.d.ts +162 -162
  14. package/Unstable_Grid/createGrid.d.ts +11 -11
  15. package/Unstable_Grid/gridClasses.d.ts +20 -20
  16. package/Unstable_Grid/gridGenerator.d.ts +29 -29
  17. package/Unstable_Grid/index.d.ts +5 -5
  18. package/borders.js +12 -7
  19. package/breakpoints.js +2 -0
  20. package/compose.js +3 -0
  21. package/createBox.d.ts +0 -2
  22. package/createBox.js +2 -3
  23. package/createBox.spec.d.ts +1 -1
  24. package/createStyled.js +2 -3
  25. package/createTheme/createSpacing.d.ts +10 -10
  26. package/createTheme/createTheme.d.ts +5 -0
  27. package/createTheme/createTheme.js +9 -0
  28. package/cssGrid.js +8 -0
  29. package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
  30. package/cssVars/createGetCssVar.d.ts +5 -5
  31. package/cssVars/cssVarsParser.d.ts +63 -63
  32. package/cssVars/getInitColorSchemeScript.d.ts +42 -42
  33. package/cssVars/index.d.ts +3 -3
  34. package/cssVars/useCurrentColorScheme.d.ts +53 -53
  35. package/esm/borders.js +9 -6
  36. package/esm/breakpoints.js +2 -0
  37. package/esm/compose.js +3 -0
  38. package/esm/createBox.js +2 -3
  39. package/esm/createStyled.js +2 -3
  40. package/esm/createTheme/createTheme.js +9 -0
  41. package/esm/cssGrid.js +9 -0
  42. package/esm/index.js +1 -2
  43. package/esm/palette.js +4 -4
  44. package/esm/sizing.js +9 -9
  45. package/esm/spacing.js +2 -2
  46. package/esm/style.js +4 -1
  47. package/esm/styleFunctionSx/defaultSxConfig.js +284 -0
  48. package/esm/styleFunctionSx/extendSxProp.js +4 -2
  49. package/esm/styleFunctionSx/index.js +2 -1
  50. package/esm/styleFunctionSx/styleFunctionSx.js +45 -17
  51. package/index.d.ts +1 -2
  52. package/index.js +8 -9
  53. package/index.spec.d.ts +1 -1
  54. package/legacy/borders.js +9 -6
  55. package/legacy/breakpoints.js +2 -0
  56. package/legacy/compose.js +3 -0
  57. package/legacy/createBox.js +2 -4
  58. package/legacy/createStyled.js +2 -4
  59. package/legacy/createTheme/createTheme.js +9 -0
  60. package/legacy/cssGrid.js +9 -0
  61. package/legacy/index.js +2 -3
  62. package/legacy/palette.js +4 -4
  63. package/legacy/sizing.js +9 -9
  64. package/legacy/spacing.js +2 -2
  65. package/legacy/style.js +3 -2
  66. package/legacy/styleFunctionSx/defaultSxConfig.js +286 -0
  67. package/legacy/styleFunctionSx/extendSxProp.js +4 -2
  68. package/legacy/styleFunctionSx/index.js +2 -1
  69. package/legacy/styleFunctionSx/styleFunctionSx.js +44 -20
  70. package/modern/borders.js +9 -6
  71. package/modern/breakpoints.js +2 -0
  72. package/modern/compose.js +3 -0
  73. package/modern/createBox.js +2 -3
  74. package/modern/createStyled.js +2 -3
  75. package/modern/createTheme/createTheme.js +9 -0
  76. package/modern/cssGrid.js +9 -0
  77. package/modern/index.js +2 -3
  78. package/modern/palette.js +4 -4
  79. package/modern/sizing.js +9 -9
  80. package/modern/spacing.js +2 -2
  81. package/modern/style.js +4 -1
  82. package/modern/styleFunctionSx/defaultSxConfig.js +284 -0
  83. package/modern/styleFunctionSx/extendSxProp.js +3 -2
  84. package/modern/styleFunctionSx/index.js +2 -1
  85. package/modern/styleFunctionSx/styleFunctionSx.js +44 -17
  86. package/package.json +6 -6
  87. package/palette.js +5 -4
  88. package/sizing.js +12 -10
  89. package/spacing.js +4 -0
  90. package/style.d.ts +10 -8
  91. package/style.js +4 -1
  92. package/styleFunctionSx/defaultSxConfig.d.ts +20 -0
  93. package/styleFunctionSx/defaultSxConfig.js +291 -0
  94. package/styleFunctionSx/extendSxProp.js +4 -2
  95. package/styleFunctionSx/index.d.ts +4 -0
  96. package/styleFunctionSx/index.js +7 -0
  97. package/styleFunctionSx/styleFunctionSx.d.ts +2 -1
  98. package/styleFunctionSx/styleFunctionSx.js +45 -17
  99. package/styleFunctionSx/styleFunctionSx.spec.d.ts +1 -1
  100. package/esm/sx/index.js +0 -1
  101. package/esm/sx/sx.js +0 -10
  102. package/legacy/sx/index.js +0 -1
  103. package/legacy/sx/sx.js +0 -11
  104. package/modern/sx/index.js +0 -1
  105. package/modern/sx/sx.js +0 -10
  106. package/sx/index.d.ts +0 -1
  107. package/sx/index.js +0 -13
  108. package/sx/package.json +0 -6
  109. package/sx/sx.d.ts +0 -4
  110. package/sx/sx.js +0 -18
package/Box/Box.spec.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/CHANGELOG.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.11.0
4
+
5
+ <!-- generated comparing v5.10.17..master -->
6
+
7
+ _Dec 13, 2022_
8
+
9
+ A big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🔥 @mnajdova enabled configuration of the `sx` prop in the `theme` (#35150)
12
+ - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
13
+
14
+ ### `@mui/material@5.11.0`
15
+
16
+ - [Alert] Update icon color in all variants (#35414) @danilo-leal
17
+ - [Select] Fix `MenuProps.PopoverClasses` being overriden (#35394) @vitorfrs-dev
18
+ - [SwipeableDrawer] Fixed typescript warning "prop open undefined" (#34710) @kraftware
19
+
20
+ ### `@mui/icons-material@5.11.0`
21
+
22
+ - [icons] Restore the PhoneInTalk icons (#35409) @michaldudak
23
+
24
+ ### `@mui/system@5.11.0`
25
+
26
+ #### BREAKING CHANGES
27
+
28
+ - [system] Enable configuring the `sx` prop in the `theme` (#35150) @mnajdova
29
+
30
+ The breaking change is regarding an experimental API:
31
+
32
+ ```diff
33
+ -import { styled, experimental_sx } from '@mui/material/styles';
34
+ +import { styled } from '@mui/material/styles';
35
+
36
+ -const Component = styled('div)(experimental_sx({ p: 1 }});
37
+ +const Component = styled('div)(({ theme }) => theme.unstable_sx({ p: 1 }});
38
+ ```
39
+
40
+ ### `@mui/joy@5.0.0-alpha.58`
41
+
42
+ - [Joy] Miscellaneous fixes (#35447) @siriwatknp
43
+
44
+ ### `@mui/base@5.0.0-alpha.110`
45
+
46
+ - [PopperUnstyled] Update PopperTooltip to have correct width when closing with transition (#34714) @EduardoSCosta
47
+
48
+ ### `@mui/material-next@6.0.0-alpha.66`
49
+
50
+ - [Material You] Add ripple on the button (#35299) @mnajdova
51
+
52
+ ### Docs
53
+
54
+ - [docs] Simplify state management in Text Field demo page (#35051) @PratikDev
55
+ - [docs] Improve `Responsive App bar with Drawer` demo (#35418) @ZeeshanTamboli
56
+ - [docs] Improve line-height readability (#35387) @oliviertassinari
57
+ - [docs] Improve a bit the Composition docs (#35329) @oliviertassinari
58
+ - [docs] Refactor `ToggleButtonSizes` demo (#35375) @Armanio
59
+ - [docs] Standardize the usage of callouts in the MUI Core docs (#35361) @samuelsycamore
60
+ - [docs] Format feedback to add a link to the commented section (#35381) @alexfauquette
61
+ - [docs] Direct users from Material UI to MUI Base for duplicated components (#35293) @samuelsycamore
62
+ - [docs] Fix typo in FormControl API docs (#35449) @Spanishiwa
63
+ - [docs] Update callouts design (#35390) @danilo-leal
64
+ - [website] New wave of open roles (#35240) @mnajdova
65
+ - [website] Developer survey 2022 (#35407) @joserodolfofreitas
66
+
67
+ ### Core
68
+
69
+ - [core] Fix @mui/material package building (#35324) @timbset
70
+ - [core] Fix leaking theme color override (#35444) @oliviertassinari
71
+ - [typescript] Add null to return type of OverridableComponent (#35311) @tsollbach
72
+ - [website] Migrate X page to use CSS theme variables (#34922) @jesrodri
73
+ - [website] Migrate `/core` page to use CSS variables (#35366) @siriwatknp
74
+
75
+ All contributors of this release in alphabetical order: @alexfauquette, @Armanio, @danilo-leal, @EduardoSCosta, @flaviendelangle, @jesrodri, @joserodolfofreitas, @kraftware, @michaldudak, @mnajdova, @oliviertassinari, @PratikDev, @samuelsycamore, @siriwatknp, @Spanishiwa, @timbset, @tsollbach, @vitorfrs-dev, @ZeeshanTamboli
76
+
3
77
  ## 5.10.17
4
78
 
5
79
  <!-- generated comparing v5.10.16..master -->
@@ -1,13 +1,13 @@
1
- /**
2
- *
3
- * Demos:
4
- *
5
- * - [Container (Material UI)](https://mui.com/material-ui/react-container/)
6
- * - [Container (MUI System)](https://mui.com/system/react-container/)
7
- *
8
- * API:
9
- *
10
- * - [Container API](https://mui.com/system/api/container/)
11
- */
12
- declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
13
- export default Container;
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Container (Material UI)](https://mui.com/material-ui/react-container/)
6
+ * - [Container (MUI System)](https://mui.com/system/react-container/)
7
+ *
8
+ * API:
9
+ *
10
+ * - [Container API](https://mui.com/system/api/container/)
11
+ */
12
+ declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
13
+ export default Container;
@@ -1,40 +1,40 @@
1
- import * as React from 'react';
2
- import { OverrideProps } from '@mui/types';
3
- import { SxProps } from '../styleFunctionSx';
4
- import { Theme, Breakpoint } from '../createTheme';
5
- import { ContainerClasses } from './containerClasses';
6
- export interface ContainerTypeMap<P = {}, D extends React.ElementType = 'div'> {
7
- props: P & {
8
- children?: React.ReactNode;
9
- /**
10
- * Override or extend the styles applied to the component.
11
- */
12
- classes?: Partial<ContainerClasses>;
13
- /**
14
- * If `true`, the left and right padding is removed.
15
- * @default false
16
- */
17
- disableGutters?: boolean;
18
- /**
19
- * Set the max-width to match the min-width of the current breakpoint.
20
- * This is useful if you'd prefer to design for a fixed set of sizes
21
- * instead of trying to accommodate a fully fluid viewport.
22
- * It's fluid by default.
23
- * @default false
24
- */
25
- fixed?: boolean;
26
- /**
27
- * Determine the max-width of the container.
28
- * The container width grows with the size of the screen.
29
- * Set to `false` to disable `maxWidth`.
30
- * @default 'lg'
31
- */
32
- maxWidth?: Breakpoint | false;
33
- /**
34
- * The system prop that allows defining system overrides as well as additional CSS styles.
35
- */
36
- sx?: SxProps<Theme>;
37
- };
38
- defaultComponent: D;
39
- }
40
- export type ContainerProps<D extends React.ElementType = ContainerTypeMap['defaultComponent'], P = {}> = OverrideProps<ContainerTypeMap<P, D>, D>;
1
+ import * as React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { SxProps } from '../styleFunctionSx';
4
+ import { Theme, Breakpoint } from '../createTheme';
5
+ import { ContainerClasses } from './containerClasses';
6
+ export interface ContainerTypeMap<P = {}, D extends React.ElementType = 'div'> {
7
+ props: P & {
8
+ children?: React.ReactNode;
9
+ /**
10
+ * Override or extend the styles applied to the component.
11
+ */
12
+ classes?: Partial<ContainerClasses>;
13
+ /**
14
+ * If `true`, the left and right padding is removed.
15
+ * @default false
16
+ */
17
+ disableGutters?: boolean;
18
+ /**
19
+ * Set the max-width to match the min-width of the current breakpoint.
20
+ * This is useful if you'd prefer to design for a fixed set of sizes
21
+ * instead of trying to accommodate a fully fluid viewport.
22
+ * It's fluid by default.
23
+ * @default false
24
+ */
25
+ fixed?: boolean;
26
+ /**
27
+ * Determine the max-width of the container.
28
+ * The container width grows with the size of the screen.
29
+ * Set to `false` to disable `maxWidth`.
30
+ * @default 'lg'
31
+ */
32
+ maxWidth?: Breakpoint | false;
33
+ /**
34
+ * The system prop that allows defining system overrides as well as additional CSS styles.
35
+ */
36
+ sx?: SxProps<Theme>;
37
+ };
38
+ defaultComponent: D;
39
+ }
40
+ export type ContainerProps<D extends React.ElementType = ContainerTypeMap['defaultComponent'], P = {}> = OverrideProps<ContainerTypeMap<P, D>, D>;
@@ -1,22 +1,22 @@
1
- export interface ContainerClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `disableGutters={true}`. */
5
- disableGutters: string;
6
- /** Styles applied to the root element if `fixed={true}`. */
7
- fixed: string;
8
- /** Styles applied to the root element if `maxWidth="xs"`. */
9
- maxWidthXs: string;
10
- /** Styles applied to the root element if `maxWidth="sm"`. */
11
- maxWidthSm: string;
12
- /** Styles applied to the root element if `maxWidth="md"`. */
13
- maxWidthMd: string;
14
- /** Styles applied to the root element if `maxWidth="lg"`. */
15
- maxWidthLg: string;
16
- /** Styles applied to the root element if `maxWidth="xl"`. */
17
- maxWidthXl: string;
18
- }
19
- export type ContainerClassKey = keyof ContainerClasses;
20
- export declare function getContainerUtilityClass(slot: string): string;
21
- declare const containerClasses: ContainerClasses;
22
- export default containerClasses;
1
+ export interface ContainerClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `disableGutters={true}`. */
5
+ disableGutters: string;
6
+ /** Styles applied to the root element if `fixed={true}`. */
7
+ fixed: string;
8
+ /** Styles applied to the root element if `maxWidth="xs"`. */
9
+ maxWidthXs: string;
10
+ /** Styles applied to the root element if `maxWidth="sm"`. */
11
+ maxWidthSm: string;
12
+ /** Styles applied to the root element if `maxWidth="md"`. */
13
+ maxWidthMd: string;
14
+ /** Styles applied to the root element if `maxWidth="lg"`. */
15
+ maxWidthLg: string;
16
+ /** Styles applied to the root element if `maxWidth="xl"`. */
17
+ maxWidthXl: string;
18
+ }
19
+ export type ContainerClassKey = keyof ContainerClasses;
20
+ export declare function getContainerUtilityClass(slot: string): string;
21
+ declare const containerClasses: ContainerClasses;
22
+ export default containerClasses;
@@ -1,18 +1,18 @@
1
- import * as React from 'react';
2
- import { Interpolation, StyledComponent } from '@mui/styled-engine';
3
- import { OverridableComponent } from '@mui/types';
4
- import { ContainerProps, ContainerTypeMap } from './ContainerProps';
5
- import { Theme as DefaultTheme } from '../createTheme';
6
- interface StyleFnProps<Theme> extends ContainerProps {
7
- theme: Theme;
8
- ownerState: ContainerProps;
9
- }
10
- type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
11
- export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
12
- createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
13
- useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
14
- component?: React.ElementType;
15
- };
16
- componentName?: string;
17
- }): OverridableComponent<ContainerTypeMap<{}, "div">>;
18
- export {};
1
+ import * as React from 'react';
2
+ import { Interpolation, StyledComponent } from '@mui/styled-engine';
3
+ import { OverridableComponent } from '@mui/types';
4
+ import { ContainerProps, ContainerTypeMap } from './ContainerProps';
5
+ import { Theme as DefaultTheme } from '../createTheme';
6
+ interface StyleFnProps<Theme> extends ContainerProps {
7
+ theme: Theme;
8
+ ownerState: ContainerProps;
9
+ }
10
+ type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
11
+ export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
12
+ createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
13
+ useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
14
+ component?: React.ElementType;
15
+ };
16
+ componentName?: string;
17
+ }): OverridableComponent<ContainerTypeMap<{}, "div">>;
18
+ export {};
package/Stack/Stack.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- /**
2
- *
3
- * Demos:
4
- *
5
- * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
6
- * - [Stack (MUI System)](https://mui.com/system/react-stack/)
7
- *
8
- * API:
9
- *
10
- * - [Stack API](https://mui.com/system/api/stack/)
11
- */
12
- declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
13
- export default Stack;
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
6
+ * - [Stack (MUI System)](https://mui.com/system/react-stack/)
7
+ *
8
+ * API:
9
+ *
10
+ * - [Stack API](https://mui.com/system/api/stack/)
11
+ */
12
+ declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
13
+ export default Stack;
@@ -1,42 +1,42 @@
1
- import * as React from 'react';
2
- import { OverrideProps } from '@mui/types';
3
- import { ResponsiveStyleValue, SxProps } from '../styleFunctionSx';
4
- import { SystemProps } from '../Box';
5
- import { Theme } from '../createTheme';
6
- export interface StackBaseProps {
7
- /**
8
- * The content of the component.
9
- */
10
- children?: React.ReactNode;
11
- /**
12
- * Defines the `flex-direction` style property.
13
- * It is applied for all screen sizes.
14
- * @default 'column'
15
- */
16
- direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
17
- /**
18
- * Defines the space between immediate children.
19
- * @default 0
20
- */
21
- spacing?: ResponsiveStyleValue<number | string>;
22
- /**
23
- * Add an element between each child.
24
- */
25
- divider?: React.ReactNode;
26
- }
27
- export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
28
- props: P & StackBaseProps & {
29
- /**
30
- * The system prop, which allows defining system overrides as well as additional CSS styles.
31
- */
32
- sx?: SxProps<Theme>;
33
- } & SystemProps<Theme>;
34
- defaultComponent: D;
35
- }
36
- export type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
37
- component?: React.ElementType;
38
- }> = OverrideProps<StackTypeMap<P, D>, D>;
39
- export interface StackOwnerState {
40
- direction: StackProps['direction'];
41
- spacing: StackProps['spacing'];
42
- }
1
+ import * as React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { ResponsiveStyleValue, SxProps } from '../styleFunctionSx';
4
+ import { SystemProps } from '../Box';
5
+ import { Theme } from '../createTheme';
6
+ export interface StackBaseProps {
7
+ /**
8
+ * The content of the component.
9
+ */
10
+ children?: React.ReactNode;
11
+ /**
12
+ * Defines the `flex-direction` style property.
13
+ * It is applied for all screen sizes.
14
+ * @default 'column'
15
+ */
16
+ direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
17
+ /**
18
+ * Defines the space between immediate children.
19
+ * @default 0
20
+ */
21
+ spacing?: ResponsiveStyleValue<number | string>;
22
+ /**
23
+ * Add an element between each child.
24
+ */
25
+ divider?: React.ReactNode;
26
+ }
27
+ export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
28
+ props: P & StackBaseProps & {
29
+ /**
30
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
31
+ */
32
+ sx?: SxProps<Theme>;
33
+ } & SystemProps<Theme>;
34
+ defaultComponent: D;
35
+ }
36
+ export type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
37
+ component?: React.ElementType;
38
+ }> = OverrideProps<StackTypeMap<P, D>, D>;
39
+ export interface StackOwnerState {
40
+ direction: StackProps['direction'];
41
+ spacing: StackProps['spacing'];
42
+ }
@@ -1,21 +1,21 @@
1
- import * as React from 'react';
2
- import { OverridableComponent } from '@mui/types';
3
- import { StackTypeMap, StackOwnerState } from './StackProps';
4
- import { Breakpoints } from '../createTheme/createBreakpoints';
5
- import { Spacing } from '../createTheme/createSpacing';
6
- interface StyleFunctionProps {
7
- theme: {
8
- breakpoints: Breakpoints;
9
- spacing: Spacing;
10
- };
11
- ownerState: StackOwnerState;
12
- }
13
- declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
14
- declare function useThemePropsDefault<T extends {}>(props: T): T & {};
15
- export declare const style: ({ ownerState, theme }: StyleFunctionProps) => any;
16
- export default function createStack(options?: {
17
- createStyledComponent?: typeof defaultCreateStyledComponent;
18
- useThemeProps?: typeof useThemePropsDefault;
19
- componentName?: string;
20
- }): OverridableComponent<StackTypeMap<{}, "div">>;
21
- export {};
1
+ import * as React from 'react';
2
+ import { OverridableComponent } from '@mui/types';
3
+ import { StackTypeMap, StackOwnerState } from './StackProps';
4
+ import { Breakpoints } from '../createTheme/createBreakpoints';
5
+ import { Spacing } from '../createTheme/createSpacing';
6
+ interface StyleFunctionProps {
7
+ theme: {
8
+ breakpoints: Breakpoints;
9
+ spacing: Spacing;
10
+ };
11
+ ownerState: StackOwnerState;
12
+ }
13
+ declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
14
+ declare function useThemePropsDefault<T extends {}>(props: T): T & {};
15
+ export declare const style: ({ ownerState, theme }: StyleFunctionProps) => any;
16
+ export default function createStack(options?: {
17
+ createStyledComponent?: typeof defaultCreateStyledComponent;
18
+ useThemeProps?: typeof useThemePropsDefault;
19
+ componentName?: string;
20
+ }): OverridableComponent<StackTypeMap<{}, "div">>;
21
+ export {};
package/Stack/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { default } from './Stack';
2
- export { default as createStack } from './createStack';
3
- export * from './StackProps';
4
- export { default as stackClasses } from './stackClasses';
5
- export * from './stackClasses';
1
+ export { default } from './Stack';
2
+ export { default as createStack } from './createStack';
3
+ export * from './StackProps';
4
+ export { default as stackClasses } from './stackClasses';
5
+ export * from './stackClasses';
@@ -1,8 +1,8 @@
1
- export interface StackClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- }
5
- export type StackClassKey = keyof StackClasses;
6
- export declare function getStackUtilityClass(slot: string): string;
7
- declare const stackClasses: StackClasses;
8
- export default stackClasses;
1
+ export interface StackClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ }
5
+ export type StackClassKey = keyof StackClasses;
6
+ export declare function getStackUtilityClass(slot: string): string;
7
+ declare const stackClasses: StackClasses;
8
+ export default stackClasses;
@@ -1,12 +1,12 @@
1
- /**
2
- *
3
- * Demos:
4
- *
5
- * - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
6
- *
7
- * API:
8
- *
9
- * - [Grid API](https://mui.com/system/api/grid/)
10
- */
11
- declare const Grid: import("@mui/types").OverridableComponent<import("./GridProps").GridTypeMap<{}, "div">>;
12
- export default Grid;
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Grid (Material UI)](https://mui.com/material-ui/react-grid/)
6
+ *
7
+ * API:
8
+ *
9
+ * - [Grid API](https://mui.com/system/api/grid/)
10
+ */
11
+ declare const Grid: import("@mui/types").OverridableComponent<import("./GridProps").GridTypeMap<{}, "div">>;
12
+ export default Grid;