@mui/system 5.11.11 → 5.11.12

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 (60) hide show
  1. package/Box/Box.spec.d.ts +1 -1
  2. package/CHANGELOG.md +144 -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 +173 -173
  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 +33 -33
  17. package/Unstable_Grid/index.d.ts +5 -5
  18. package/createBox.spec.d.ts +1 -1
  19. package/createTheme/createSpacing.d.ts +10 -10
  20. package/cssVars/createCssVarsProvider.d.ts +0 -8
  21. package/cssVars/createCssVarsProvider.js +8 -16
  22. package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
  23. package/cssVars/createCssVarsTheme.d.ts +10 -0
  24. package/cssVars/createCssVarsTheme.js +24 -0
  25. package/cssVars/createGetCssVar.d.ts +5 -5
  26. package/cssVars/createGetCssVar.js +1 -1
  27. package/cssVars/cssVarsParser.d.ts +64 -63
  28. package/cssVars/cssVarsParser.js +4 -1
  29. package/cssVars/getInitColorSchemeScript.d.ts +42 -42
  30. package/cssVars/index.d.ts +5 -3
  31. package/cssVars/index.js +15 -1
  32. package/cssVars/prepareCssVars.d.ts +11 -0
  33. package/cssVars/prepareCssVars.js +70 -0
  34. package/cssVars/useCurrentColorScheme.d.ts +53 -53
  35. package/esm/cssVars/createCssVarsProvider.js +8 -16
  36. package/esm/cssVars/createCssVarsTheme.js +16 -0
  37. package/esm/cssVars/createGetCssVar.js +1 -1
  38. package/esm/cssVars/cssVarsParser.js +4 -1
  39. package/esm/cssVars/index.js +3 -1
  40. package/esm/cssVars/prepareCssVars.js +62 -0
  41. package/esm/index.js +3 -0
  42. package/index.d.ts +3 -0
  43. package/index.js +25 -1
  44. package/index.spec.d.ts +1 -1
  45. package/legacy/cssVars/createCssVarsProvider.js +15 -21
  46. package/legacy/cssVars/createCssVarsTheme.js +13 -0
  47. package/legacy/cssVars/createGetCssVar.js +1 -1
  48. package/legacy/cssVars/cssVarsParser.js +4 -1
  49. package/legacy/cssVars/index.js +3 -1
  50. package/legacy/cssVars/prepareCssVars.js +59 -0
  51. package/legacy/index.js +4 -1
  52. package/modern/cssVars/createCssVarsProvider.js +8 -16
  53. package/modern/cssVars/createCssVarsTheme.js +16 -0
  54. package/modern/cssVars/createGetCssVar.js +1 -1
  55. package/modern/cssVars/cssVarsParser.js +4 -1
  56. package/modern/cssVars/index.js +3 -1
  57. package/modern/cssVars/prepareCssVars.js +62 -0
  58. package/modern/index.js +4 -1
  59. package/package.json +3 -3
  60. package/styleFunctionSx/styleFunctionSx.spec.d.ts +1 -1
package/Box/Box.spec.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/CHANGELOG.md CHANGED
@@ -1,5 +1,149 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.11.12
4
+
5
+ <!-- generated comparing v5.11.11..master -->
6
+
7
+ _Mar 6, 2023_
8
+
9
+ A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - @michaldudak added the multiselect functionality to SelectUnstyled (#36274)
12
+ - @mnajdova updated `extendTheme` so that it can generate CSS variables with default values. This means that the `CssVarsProvider` is no longer required for Joy UI when using the default theme (#35739)
13
+ - other 🐛 bug fixes and 📚 documentation improvements.
14
+
15
+ ### `@mui/material@5.11.12`
16
+
17
+ - &#8203;<!-- 30 -->[Autocomplete] Fix list scrolls to the top when new data is added on touch devices (#36231) @SaidMarar
18
+ - &#8203;<!-- 29 -->[Autocomplete] Add `Mui-expanded` class (#33312) @Osman-Sodefa
19
+ - &#8203;<!-- 24 -->[Dialog] Use the `id` prop provided to the `DialogTitle` component (#36353) @Kundan28
20
+ - &#8203;<!-- 07 -->[Menu] Fix Menu Paper styles overriding in the theme (#36316) @Paatus
21
+
22
+ ### `@mui/lab@5.0.0-alpha.122`
23
+
24
+ - &#8203;<!-- 05 -->[TreeView] Fix Tree View inside shadow root crashes (#36225) @NoFr1ends
25
+
26
+ ### `@mui/system@5.11.12`
27
+
28
+ #### Breaking changes
29
+
30
+ - &#8203;<!-- 26 -->[core] Generate vars in `extendTheme` (#35739) @mnajdova
31
+
32
+ The `shouldSkipGeneratingVar` prop was moved from the `createCssVarsProvider`'s option to the `theme`. If the default theme does not use `extendTheme` from Material UI or Joy UI, it needs to be wrapped inside `unstable_createCssVarsTheme` - a util exported from the MUI System. Below is an example of how the migration should look like:
33
+
34
+ ```diff
35
+ import {
36
+ unstable_createCssVarsProvider as createCssVarsProvider,
37
+ + unstable_createCssVarsTheme as createCssVarsTheme,
38
+ } from '@mui/system';
39
+
40
+ const { CssVarsProvider } = createCssVarsProvider({
41
+ - theme: {
42
+ + theme: createCssVarsTheme({
43
+ colorSchemes: {
44
+ light: {
45
+ typography: {
46
+ htmlFontSize: '16px',
47
+ h1: {
48
+ fontSize: '1rem',
49
+ fontWeight: 500,
50
+ },
51
+ },
52
+ },
53
+ },
54
+ + shouldSkipGeneratingVar: (keys) => keys[0] === 'typography' && keys[1] === 'h1',
55
+ - },
56
+ + }),
57
+ defaultColorScheme: 'light',
58
+ - shouldSkipGeneratingVar: (keys) => keys[0] === 'typography' && keys[1] === 'h1',
59
+ });
60
+ ```
61
+
62
+ Or you can define it directly in the theme prop:
63
+
64
+ ```diff
65
+ <CssVarsProvider
66
+ + theme={createCssVarsProvider({
67
+ + // other theme keys
68
+ + shouldSkipGeneratingVar: (keys) => keys[0] === 'typography' && keys[1] === 'h1'
69
+ + })} />
70
+ ```
71
+
72
+ This breaking change **only** affects experimental APIs
73
+
74
+ ### `@mui/base@5.0.0-alpha.120`
75
+
76
+ #### Breaking changes
77
+
78
+ - &#8203;<!-- 27 -->[Select][base] Add the multiselect functionality to SelectUnstyled (#36274) @michaldudak
79
+
80
+ The MultiSelectUnstyled was removed. The `SelectUnstyled` component with the `multiple` prop should be used instead. Additionally, the SelectUnstyledProps received a second generic parameter: `Multiple extends boolean`. If you deal with strictly single- or multi-select components, you can hard-code this parameter to `false` or `true`, respectively. Below is an example of how the migration should look like:
81
+
82
+ ```diff
83
+ -import MultiSelectUnstyled from '@mui/base/MultiSelectUnstyled';
84
+ +import SelectUnstyled from '@mui/base/SelectUnstyled';
85
+
86
+ export default App() {
87
+ -return <MultiSelectUnstyled />
88
+ +return <SelectUnstyled multiple />
89
+ }
90
+ ```
91
+
92
+ #### Changes
93
+
94
+ - &#8203;<!-- 34 -->[useSnackBar] Add explicit return type (#36052) @sai6855
95
+ - &#8203;<!-- 04 -->[useMenu] Fix `import type` syntax (#36411) @ZeeshanTamboli
96
+ - &#8203;<!-- 03 -->[useSwitch] Add explicit return type (#36050) @sai6855
97
+
98
+ ### `@mui/joy@5.0.0-alpha.70`
99
+
100
+ #### Breaking changes
101
+
102
+ - &#8203;<!-- 09 -->[Joy] Change CSS variables naming for components (#36282) @hbjORbj
103
+
104
+ Joy UI has new naming standards of the CSS variables for its components. Below is an example of how the migration should look like:
105
+
106
+ ```diff
107
+ -<List sx={{ py: 'var(--List-divider-gap)' }}>
108
+ +<List sx={{ py: 'var(--ListDivider-gap)' }}>
109
+ -<Switch sx={{ '--Switch-track-width': '40px' }}>
110
+ +<Switch sx={{ '--Switch-trackWidth': '40px' }}>
111
+ ```
112
+
113
+ #### Changes
114
+
115
+ - &#8203;<!-- 28 -->[Autocomplete][joy] Add disabled class to the popup indicator (#36397) @hbjORbj
116
+ - &#8203;<!-- 08 -->[Joy] Fix broken loading button in Safari (#36298) @Kuba429
117
+
118
+ ### Docs
119
+
120
+ - &#8203;<!-- 33 -->[docs][joy] Clarify when `CssVarsProvider` is required (#36410) @mnajdova
121
+ - &#8203;<!-- 32 -->MUI X v6 release announcement (#36398) @joserodolfofreitas
122
+ - &#8203;<!-- 23 -->[docs] Add instructions for deploying docs without a release (#36301) @cherniavskii
123
+ - &#8203;<!-- 22 -->[docs] Fix 301 redirections on the docs @oliviertassinari
124
+ - &#8203;<!-- 21 -->[docs] Update MUI X banner to reflect stable release (#36354) @MBilalShafi
125
+ - &#8203;<!-- 20 -->[docs] Clarify the future plan for integrating MUI Base in Material UI (#36365) @mnajdova
126
+ - &#8203;<!-- 19 -->[docs] Improve visual look of loose lists (#36190) @oliviertassinari
127
+ - &#8203;<!-- 18 -->[docs] Fix @mui/styles example links (#36331) @oliviertassinari
128
+ - &#8203;<!-- 17 -->[docs][joy] Build TS versions for List component demos (#36382) @sai6855
129
+ - &#8203;<!-- 16 -->[docs][joy] Build TS versions for Radio component demos (#36406) @sai6855
130
+ - &#8203;<!-- 15 -->[docs][joy] Build TS versions for Checkbox component demos (#36381) @sai6855
131
+ - &#8203;<!-- 14 -->[docs][joy] Build TS versions for Select component demos (#36380) @sai6855
132
+ - &#8203;<!-- 13 -->[docs][joy] Build TS versions for Typography component demos (#36378) @varunmulay22
133
+ - &#8203;<!-- 12 -->[docs][joy] Add typescript demos for `Divider` (#36374) @sai6855
134
+ - &#8203;<!-- 11 -->[docs][joy] Build TS versions for Textarea component demos (#36371) @varunmulay22
135
+ - &#8203;<!-- 10 -->[docs][joy] Build TS versions for Link component demos (#36366) @hbjORbj
136
+
137
+ ### Core
138
+
139
+ - &#8203;<!-- 31 -->Revert "Bump rimraf to ^4.1.3" (#36420) @mnajdova
140
+ - &#8203;<!-- 25 -->[core] Fix test utils types and external `buildApiUtils` usage issues (#36310) @LukasTy
141
+ - &#8203;<!-- 06 -->[test] Remove duplicate `combobox` role queries in Autocomplete tests (#36394) @ZeeshanTamboli
142
+ - &#8203;<!-- 02 -->[website] Clarify redistribution @oliviertassinari
143
+ - &#8203;<!-- 01 -->[website] Sync /about page (#36334) @oliviertassinari
144
+
145
+ All contributors of this release in alphabetical order: @cherniavskii, @hbjORbj, @joserodolfofreitas, @Kuba429, @Kundan28, @LukasTy, @MBilalShafi, @michaldudak, @mnajdova, @NoFr1ends, @oliviertassinari, @Osman-Sodefa, @Paatus, @sai6855, @SaidMarar, @varunmulay22, @ZeeshanTamboli
146
+
3
147
  ## 5.11.11
4
148
 
5
149
  <!-- generated comparing v5.11.10..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;