@mui/system 5.14.3 → 5.14.4

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 (41) hide show
  1. package/Box/Box.d.ts +20 -9
  2. package/CHANGELOG.md +102 -4
  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/GlobalStyles/GlobalStyles.d.ts +13 -13
  8. package/GlobalStyles/index.d.ts +2 -2
  9. package/Stack/Stack.d.ts +14 -14
  10. package/Stack/StackProps.d.ts +53 -53
  11. package/Stack/createStack.d.ts +21 -21
  12. package/Stack/index.d.ts +5 -5
  13. package/Stack/stackClasses.d.ts +8 -8
  14. package/Unstable_Grid/Grid.d.ts +12 -12
  15. package/Unstable_Grid/GridProps.d.ts +185 -185
  16. package/Unstable_Grid/createGrid.d.ts +11 -11
  17. package/Unstable_Grid/gridClasses.d.ts +20 -20
  18. package/Unstable_Grid/gridGenerator.d.ts +33 -33
  19. package/Unstable_Grid/index.d.ts +6 -6
  20. package/Unstable_Grid/traverseBreakpoints.d.ts +7 -7
  21. package/createStyled.d.ts +6 -6
  22. package/createStyled.js +23 -4
  23. package/createTheme/createSpacing.d.ts +10 -10
  24. package/cssVars/createCssVarsTheme.d.ts +15 -15
  25. package/cssVars/createGetCssVar.d.ts +5 -5
  26. package/cssVars/cssVarsParser.d.ts +64 -64
  27. package/cssVars/getInitColorSchemeScript.d.ts +42 -42
  28. package/cssVars/index.d.ts +5 -5
  29. package/cssVars/prepareCssVars.d.ts +16 -16
  30. package/cssVars/useCurrentColorScheme.d.ts +53 -53
  31. package/esm/createStyled.js +24 -5
  32. package/esm/styleFunctionSx/styleFunctionSx.js +2 -0
  33. package/index.js +1 -1
  34. package/legacy/createStyled.js +25 -5
  35. package/legacy/index.js +1 -1
  36. package/legacy/styleFunctionSx/styleFunctionSx.js +2 -0
  37. package/modern/createStyled.js +24 -5
  38. package/modern/index.js +1 -1
  39. package/modern/styleFunctionSx/styleFunctionSx.js +2 -0
  40. package/package.json +3 -3
  41. package/styleFunctionSx/styleFunctionSx.js +2 -0
package/Box/Box.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { OverridableComponent, OverrideProps } from '@mui/types';
3
- import { Theme } from '../createTheme';
3
+ import { Theme as SystemTheme } from '../createTheme';
4
4
  import {
5
5
  SxProps,
6
6
  AllSystemCSSProperties,
@@ -170,17 +170,26 @@ export type SystemProps<Theme extends object = {}> = {
170
170
  | ((theme: Theme) => ResponsiveStyleValue<AllSystemCSSProperties[K]>);
171
171
  };
172
172
 
173
- export interface BoxTypeMap<P = {}, D extends React.ElementType = 'div', T extends object = Theme> {
174
- props: P &
175
- SystemProps<T> & {
173
+ export interface BoxTypeMap<
174
+ AdditionalProps = {},
175
+ RootComponent extends React.ElementType = 'div',
176
+ Theme extends object = SystemTheme,
177
+ > {
178
+ props: AdditionalProps &
179
+ SystemProps<Theme> & {
176
180
  children?: React.ReactNode;
181
+ /**
182
+ * The component used for the root node.
183
+ * Either a string to use a HTML element or a component.
184
+ */
185
+ component?: React.ElementType;
177
186
  ref?: React.Ref<unknown>;
178
187
  /**
179
188
  * The system prop that allows defining system overrides as well as additional CSS styles.
180
189
  */
181
- sx?: SxProps<T>;
190
+ sx?: SxProps<Theme>;
182
191
  };
183
- defaultComponent: D;
192
+ defaultComponent: RootComponent;
184
193
  }
185
194
  /**
186
195
  *
@@ -196,8 +205,10 @@ export interface BoxTypeMap<P = {}, D extends React.ElementType = 'div', T exten
196
205
  declare const Box: OverridableComponent<BoxTypeMap>;
197
206
 
198
207
  export type BoxProps<
199
- D extends React.ElementType = BoxTypeMap['defaultComponent'],
200
- P = {},
201
- > = OverrideProps<BoxTypeMap<P, D>, D> & { component?: React.ElementType };
208
+ RootComponent extends React.ElementType = BoxTypeMap['defaultComponent'],
209
+ AdditionalProps = {},
210
+ > = OverrideProps<BoxTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
211
+ component?: React.ElementType;
212
+ };
202
213
 
203
214
  export default Box;
package/CHANGELOG.md CHANGED
@@ -1,5 +1,103 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.14.4
4
+
5
+ <!-- generated comparing v5.14.3..master -->
6
+
7
+ _Aug 8, 2023_
8
+
9
+ A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🎉 Added [Number input](https://mui.com/base-ui/react-number-input) component & [useNumberInput](https://mui.com/base-ui/react-number-input#hook) hook in [Base UI](https://mui.com/base-ui/getting-started/) @mj12albert
12
+
13
+ ### `@mui/material@5.14.4`
14
+
15
+ - &#8203;<!-- 25 -->[Checkbox][material] Add size classes (#38182) @michaldudak
16
+ - &#8203;<!-- 03 -->[Typography] Improve inherit variant logic (#38123) @ZeeshanTamboli
17
+
18
+ ### `@mui/system@5.14.4`
19
+
20
+ - &#8203;<!-- 34 -->Revert "[Box] Remove `component` from TypeMap (#38168)" (#38356) @michaldudak
21
+
22
+ ### `@mui/base@5.0.0-beta.10`
23
+
24
+ #### Breaking changes
25
+
26
+ - &#8203;<!-- 32 -->[base] Ban default exports (#38200) @michaldudak
27
+
28
+ Base UI default exports were changed to named ones. Previously we had a mix of default and named ones.
29
+ This was changed to improve consistency and avoid problems some bundlers have with default exports.
30
+ See https://github.com/mui/material-ui/issues/21862 for more context.
31
+
32
+ ```diff
33
+ - import Button, { buttonClasses } from '@mui/base/Button';
34
+ + import { Button, buttonClasses } from '@mui/base/Button';
35
+ - import BaseMenu from '@mui/base/Menu';
36
+ + import { Menu as BaseMenu } from '@mui/base/Menu';
37
+ ```
38
+
39
+ Additionally, the `ClassNameGenerator` has been moved to the directory matching its name:
40
+
41
+ ```diff
42
+ - import ClassNameGenerator from '@mui/base/className';
43
+ + import { ClassNameGenerator } from '@mui/base/ClassNameGenerator';
44
+ ```
45
+
46
+ A codemod is provided to help with the migration:
47
+
48
+ ```bash
49
+ npx @mui/codemod v5.0.0/base-use-named-imports <path>
50
+ ```
51
+
52
+ #### Changes
53
+
54
+ - &#8203;<!-- 31 -->[base] Create useNumberInput and NumberInput (#36119) @mj12albert
55
+ - &#8203;<!-- 28 -->[Select][base] Fix flicker on click of controlled Select button (#37855) @VishruthR
56
+ - &#8203;<!-- 09 -->[Dropdown] Fix imports of types (#38296) @yash-thakur
57
+
58
+ ### `@mui/joy@5.0.0-beta.1`
59
+
60
+ - &#8203;<!-- 06 -->[joy-ui][MenuButton] Fix disable of `MenuButton` (#38342) @sai6855
61
+
62
+ ### Docs
63
+
64
+ - &#8203;<!-- 33 -->[docs][AppBar] Fix `ResponsiveAppBar` demo logo href (#38346) @iownthegame
65
+ - &#8203;<!-- 30 -->[docs][base] Add Tailwind CSS + plain CSS demo on the Button page (#38240) @alisasanib
66
+ - &#8203;<!-- 29 -->[docs][Menu][base] Remove `Unstyled` prefix from demos' function names (#38270) @sai6855
67
+ - &#8203;<!-- 22 -->[docs] Add themeable component guide (#37908) @siriwatknp
68
+ - &#8203;<!-- 21 -->[docs] Fix Joy UI demo background color (#38307) @oliviertassinari
69
+ - &#8203;<!-- 20 -->[docs] Update API docs for Number Input component (#38301) @ZeeshanTamboli
70
+ - &#8203;<!-- 14 -->[docs][joy-ui] Revise the theme typography page (#38285) @danilo-leal
71
+ - &#8203;<!-- 13 -->[docs][joy-ui] Add TS demo for Menu Bar (#38308) @sai6855
72
+ - &#8203;<!-- 10 -->[docs][joy-ui] Updated Typography callout at getting started (#38289) @zanivan
73
+ - &#8203;<!-- 12 -->[docs][joy-ui] Fix the Inter font installation instructions (#38284) @danilo-leal
74
+ - &#8203;<!-- 11 -->[docs][material] Add note to Autocomplete about ref forwarding (#38305) @samuelsycamore
75
+ - &#8203;<!-- 05 -->[docs][Skeleton] Make the demos feel more realistic (#38212) @oliviertassinari
76
+
77
+ - &#8203;<!-- 08 -->[examples] Swap Next.js examples between App Router and Pages Router; update naming convention (#38204) @samuelsycamore
78
+ - &#8203;<!-- 07 -->[examples][material-ui] Add Material UI + Next.js (App Router) example in JS (#38323) @samuelsycamore
79
+ - &#8203;<!-- 27 -->[blog] Discord announcement blog (#38258) @richbustos
80
+ - &#8203;<!-- 26 -->[blog] Fix 301 links to Toolpad @oliviertassinari
81
+ - &#8203;<!-- 04 -->[website] Updating Charts demo with real charts usage for MUI X marketing page (#38317) @richbustos
82
+ - &#8203;<!-- 03 -->[website] Adjust styles of the Product section on the homepage (#38366) @danilo-leal
83
+ - &#8203;<!-- 02 -->[website] Add Nora teamMember card to 'About' (#38358) @noraleonte
84
+ - &#8203;<!-- 01 -->[website] Fix image layout shift (#38326) @oliviertassinari
85
+
86
+ ### Core
87
+
88
+ - &#8203;<!-- 24 -->[core] Fix docs demo export function consistency (#38191) @oliviertassinari
89
+ - &#8203;<!-- 23 -->[core] Fix the link-check script on Windows (#38276) @michaldudak
90
+ - &#8203;<!-- 26 -->[core] Use @testing-library/user-event direct API (#38325) @mj12albert
91
+ - &#8203;<!-- 29 -->[core] Port GitHub workflow for ensuring triage label is present (#38312) @DanailH
92
+ - &#8203;<!-- 19 -->[docs-infra] Consider files ending with .types.ts as props files (#37533) @mnajdova
93
+ - &#8203;<!-- 18 -->[docs-infra] Fix skip to content design (#38304) @oliviertassinari
94
+ - &#8203;<!-- 17 -->[docs-infra] Add a general round of polish to the API content display (#38282) @danilo-leal
95
+ - &#8203;<!-- 16 -->[docs-infra] Make the side nav collapse animation snappier (#38259) @danilo-leal
96
+ - &#8203;<!-- 15 -->[docs-infra] New Component API design followup (#38183) @cherniavskii
97
+ - &#8203;<!-- 06 -->[test] Remove unnecessary `async` keyword from test (#38373) @ZeeshanTamboli
98
+
99
+ All contributors of this release in alphabetical order: @alisasanib, @cherniavskii, @DanailH, @danilo-leal, @iownthegame, @michaldudak, @mj12albert, @mnajdova, @noraleonte, @oliviertassinari, @richbustos, @sai6855, @samuelsycamore, @siriwatknp, @VishruthR, @yash-thakur, @zanivan, @ZeeshanTamboli
100
+
3
101
  ## 5.14.3
4
102
 
5
103
  <!-- generated comparing v5.14.2..master -->
@@ -129,7 +227,7 @@ A big thanks to the 23 contributors who made this release possible.
129
227
  - &#8203;<!-- 19 -->[docs][joy] Add adjustments to the color inversion page (#37143) @danilo-leal
130
228
  - &#8203;<!-- 18 -->[docs][material] Improve documentation about adding custom colors (#37743) @DiegoAndai
131
229
  - &#8203;<!-- 17 -->[examples] Fix Joy UI Next.js App Router font loading (#38095) @IgnacioUtrilla
132
- - &#8203;<!-- 16 -->[examples] Fix material-next-app-router Font Usage with next/font (#38026) @onderonur
230
+ - &#8203;<!-- 16 -->[examples] Fix material-next Font Usage with next/font (#38026) @onderonur
133
231
 
134
232
  ### Core
135
233
 
@@ -401,7 +499,7 @@ _Jun 21, 2023_
401
499
  A big thanks to the 25 contributors who made this release possible. Here are some highlights ✨:
402
500
 
403
501
  - 💫 Added [Slider](https://mui.com/material-ui/react-slider/#material-you-version) component using the new Material You design language (#37520) @DiegoAndai.
404
- - 📚 Added [examples](https://github.com/mui/material-ui/tree/master/examples/material-next-app-router-ts) showcasing how you can use Material UI with next.js's app directory (#37315) @smo043
502
+ - 📚 Added [examples](https://github.com/mui/material-ui/tree/master/examples/material-ui-nextjs-ts) showcasing how you can use Material UI with next.js's app directory (#37315) @smo043
405
503
 
406
504
  ### `@mui/material@5.13.6`
407
505
 
@@ -462,7 +560,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
462
560
  - &#8203;<!-- 19 -->[docs-infra] Add analyticsTags to Algolia (#37600) @Janpot
463
561
  - &#8203;<!-- 18 -->[docs-infra] Simplify product id handling (#37593) @oliviertassinari
464
562
  - &#8203;<!-- 35 -->[CHANGELOG] Add missing release date for v5.13.5 @oliviertassinari
465
- - &#8203;<!-- 16 -->[examples] Shell command fix in the readme file of material-next-app-router-ts example (#37675) @bablukpik
563
+ - &#8203;<!-- 16 -->[examples] Shell command fix in the readme file of material-next-ts example (#37675) @bablukpik
466
564
  - &#8203;<!-- 15 -->[examples] Next.js v13 app router with Material UI (#37315) @smo043
467
565
 
468
566
  ### Core
@@ -5109,7 +5207,7 @@ _Feb 1, 2022_
5109
5207
 
5110
5208
  A big thanks to the 22 contributors who made this release possible. Here are some highlights ✨:
5111
5209
 
5112
- - 🛠 @goncalovf added an example project using [Material UI with Vite.js](https://github.com/mui/material-ui/tree/master/examples/material-vite) (#28241)
5210
+ - 🛠 @goncalovf added an example project using [Material UI with Vite.js](https://github.com/mui/material-ui/tree/master/examples/material-ui-vite) (#28241)
5113
5211
  - Number of 🐛 bug fixes and 📚 documentation improvements.
5114
5212
 
5115
5213
  ### `@mui/material@5.4.0`
@@ -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<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
7
+ props: AdditionalProps & {
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: DefaultComponent;
39
+ }
40
+ export type ContainerProps<RootComponent extends React.ElementType = ContainerTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<ContainerTypeMap<AdditionalProps, RootComponent>, RootComponent>;
@@ -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 {};
@@ -1,13 +1,13 @@
1
- import * as React from 'react';
2
- import { Interpolation } from '@mui/styled-engine';
3
- import { Theme as SystemTheme } from '../createTheme';
4
- export interface GlobalStylesProps<Theme = SystemTheme> {
5
- styles: Interpolation<Theme>;
6
- defaultTheme?: object;
7
- themeId?: string;
8
- }
9
- declare function GlobalStyles<Theme = SystemTheme>({ styles, themeId, defaultTheme, }: GlobalStylesProps<Theme>): React.JSX.Element;
10
- declare namespace GlobalStyles {
11
- var propTypes: any;
12
- }
13
- export default GlobalStyles;
1
+ import * as React from 'react';
2
+ import { Interpolation } from '@mui/styled-engine';
3
+ import { Theme as SystemTheme } from '../createTheme';
4
+ export interface GlobalStylesProps<Theme = SystemTheme> {
5
+ styles: Interpolation<Theme>;
6
+ defaultTheme?: object;
7
+ themeId?: string;
8
+ }
9
+ declare function GlobalStyles<Theme = SystemTheme>({ styles, themeId, defaultTheme, }: GlobalStylesProps<Theme>): React.JSX.Element;
10
+ declare namespace GlobalStyles {
11
+ var propTypes: any;
12
+ }
13
+ export default GlobalStyles;
@@ -1,2 +1,2 @@
1
- export { default } from './GlobalStyles';
2
- export * from './GlobalStyles';
1
+ export { default } from './GlobalStyles';
2
+ export * from './GlobalStyles';
package/Stack/Stack.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- /**
2
- *
3
- * Demos:
4
- *
5
- * - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
6
- * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
7
- * - [Stack (MUI System)](https://mui.com/system/react-stack/)
8
- *
9
- * API:
10
- *
11
- * - [Stack API](https://mui.com/system/api/stack/)
12
- */
13
- declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
14
- export default Stack;
1
+ /**
2
+ *
3
+ * Demos:
4
+ *
5
+ * - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/)
6
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
7
+ * - [Stack (MUI System)](https://mui.com/system/react-stack/)
8
+ *
9
+ * API:
10
+ *
11
+ * - [Stack API](https://mui.com/system/api/stack/)
12
+ */
13
+ declare const Stack: import("@mui/types").OverridableComponent<import("./StackProps").StackTypeMap<{}, "div">>;
14
+ export default Stack;
@@ -1,53 +1,53 @@
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
- * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
28
- *
29
- * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
30
- * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
31
- *
32
- * To enable this flag globally, follow the theme's default props configuration.
33
- * @default false
34
- */
35
- useFlexGap?: boolean;
36
- }
37
- export interface StackTypeMap<P = {}, D extends React.ElementType = 'div'> {
38
- props: P & StackBaseProps & {
39
- /**
40
- * The system prop, which allows defining system overrides as well as additional CSS styles.
41
- */
42
- sx?: SxProps<Theme>;
43
- } & SystemProps<Theme>;
44
- defaultComponent: D;
45
- }
46
- export type StackProps<D extends React.ElementType = StackTypeMap['defaultComponent'], P = {
47
- component?: React.ElementType;
48
- }> = OverrideProps<StackTypeMap<P, D>, D>;
49
- export interface StackOwnerState {
50
- direction: StackProps['direction'];
51
- spacing: StackProps['spacing'];
52
- useFlexGap: boolean;
53
- }
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
+ * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
28
+ *
29
+ * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
30
+ * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
31
+ *
32
+ * To enable this flag globally, follow the theme's default props configuration.
33
+ * @default false
34
+ */
35
+ useFlexGap?: boolean;
36
+ }
37
+ export interface StackTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
38
+ props: AdditionalProps & StackBaseProps & {
39
+ /**
40
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
41
+ */
42
+ sx?: SxProps<Theme>;
43
+ } & SystemProps<Theme>;
44
+ defaultComponent: DefaultComponent;
45
+ }
46
+ export type StackProps<RootComponent extends React.ElementType = StackTypeMap['defaultComponent'], AdditionalProps = {
47
+ component?: React.ElementType;
48
+ }> = OverrideProps<StackTypeMap<AdditionalProps, RootComponent>, RootComponent>;
49
+ export interface StackOwnerState {
50
+ direction: StackProps['direction'];
51
+ spacing: StackProps['spacing'];
52
+ useFlexGap: boolean;
53
+ }
@@ -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;