@mui/system 7.0.2 → 7.1.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 (162) hide show
  1. package/Box/Box.d.ts +12 -31
  2. package/CHANGELOG.md +97 -0
  3. package/Grid/createGrid.js +1 -2
  4. package/InitColorSchemeScript/InitColorSchemeScript.js +1 -1
  5. package/Stack/createStack.js +1 -2
  6. package/borders/borders.d.ts +2 -1
  7. package/breakpoints/breakpoints.d.ts +1 -1
  8. package/compose/compose.d.ts +14 -1
  9. package/compose/index.d.ts +1 -1
  10. package/cssGrid/cssGrid.d.ts +2 -1
  11. package/display/display.d.ts +2 -1
  12. package/esm/Box/Box.d.ts +12 -31
  13. package/esm/Grid/createGrid.js +1 -2
  14. package/esm/InitColorSchemeScript/InitColorSchemeScript.js +1 -1
  15. package/esm/Stack/createStack.js +1 -2
  16. package/esm/borders/borders.d.ts +2 -1
  17. package/esm/breakpoints/breakpoints.d.ts +1 -1
  18. package/esm/compose/compose.d.ts +14 -1
  19. package/esm/compose/index.d.ts +1 -1
  20. package/esm/cssGrid/cssGrid.d.ts +2 -1
  21. package/esm/display/display.d.ts +2 -1
  22. package/esm/flexbox/flexbox.d.ts +15 -1
  23. package/esm/index.d.ts +10 -0
  24. package/esm/index.js +1 -1
  25. package/esm/palette/palette.d.ts +2 -1
  26. package/esm/positions/positions.d.ts +2 -1
  27. package/esm/shadows/shadows.d.ts +2 -1
  28. package/esm/sizing/sizing.d.ts +2 -1
  29. package/esm/spacing/spacing.d.ts +2 -1
  30. package/esm/style/style.d.ts +5 -1
  31. package/esm/styleFunctionSx/defaultSxConfig.d.ts +1 -2
  32. package/esm/typography/typography.d.ts +2 -1
  33. package/esm/useMediaQuery/useMediaQuery.js +3 -0
  34. package/esm/version/index.js +3 -3
  35. package/flexbox/flexbox.d.ts +15 -1
  36. package/index.d.ts +10 -0
  37. package/index.js +1 -1
  38. package/package.json +7 -7
  39. package/palette/palette.d.ts +2 -1
  40. package/positions/positions.d.ts +2 -1
  41. package/shadows/shadows.d.ts +2 -1
  42. package/sizing/sizing.d.ts +2 -1
  43. package/spacing/spacing.d.ts +2 -1
  44. package/style/style.d.ts +5 -1
  45. package/styleFunctionSx/defaultSxConfig.d.ts +1 -2
  46. package/typography/typography.d.ts +2 -1
  47. package/useMediaQuery/useMediaQuery.js +3 -0
  48. package/version/index.js +3 -3
  49. package/modern/Box/Box.d.ts +0 -72
  50. package/modern/Box/boxClasses.d.ts +0 -7
  51. package/modern/Box/index.d.ts +0 -4
  52. package/modern/CSSProperties.d.ts +0 -7
  53. package/modern/Container/Container.d.ts +0 -13
  54. package/modern/Container/ContainerProps.d.ts +0 -40
  55. package/modern/Container/containerClasses.d.ts +0 -22
  56. package/modern/Container/createContainer.d.ts +0 -18
  57. package/modern/Container/index.d.ts +0 -4
  58. package/modern/DefaultPropsProvider/DefaultPropsProvider.d.ts +0 -18
  59. package/modern/DefaultPropsProvider/index.d.ts +0 -1
  60. package/modern/GlobalStyles/GlobalStyles.d.ts +0 -17
  61. package/modern/GlobalStyles/index.d.ts +0 -2
  62. package/modern/Grid/Grid.d.ts +0 -13
  63. package/modern/Grid/GridProps.d.ts +0 -103
  64. package/modern/Grid/createGrid.d.ts +0 -13
  65. package/modern/Grid/deleteLegacyGridProps.d.ts +0 -11
  66. package/modern/Grid/gridClasses.d.ts +0 -20
  67. package/modern/Grid/gridGenerator.d.ts +0 -42
  68. package/modern/Grid/index.d.ts +0 -7
  69. package/modern/Grid/traverseBreakpoints.d.ts +0 -7
  70. package/modern/InitColorSchemeScript/InitColorSchemeScript.d.ts +0 -51
  71. package/modern/InitColorSchemeScript/index.d.ts +0 -2
  72. package/modern/RtlProvider/index.d.ts +0 -8
  73. package/modern/Stack/Stack.d.ts +0 -14
  74. package/modern/Stack/StackProps.d.ts +0 -53
  75. package/modern/Stack/createStack.d.ts +0 -24
  76. package/modern/Stack/index.d.ts +0 -5
  77. package/modern/Stack/stackClasses.d.ts +0 -8
  78. package/modern/ThemeProvider/ThemeProvider.d.ts +0 -24
  79. package/modern/ThemeProvider/index.d.ts +0 -2
  80. package/modern/borders/borders.d.ts +0 -14
  81. package/modern/borders/index.d.ts +0 -2
  82. package/modern/breakpoints/breakpoints.d.ts +0 -19
  83. package/modern/breakpoints/index.d.ts +0 -2
  84. package/modern/colorManipulator/colorManipulator.d.ts +0 -25
  85. package/modern/colorManipulator/index.d.ts +0 -1
  86. package/modern/compose/compose.d.ts +0 -2
  87. package/modern/compose/index.d.ts +0 -1
  88. package/modern/createBox/createBox.d.ts +0 -9
  89. package/modern/createBox/index.d.ts +0 -1
  90. package/modern/createBreakpoints/createBreakpoints.d.ts +0 -78
  91. package/modern/createBreakpoints/index.d.ts +0 -3
  92. package/modern/createStyled/createStyled.d.ts +0 -27
  93. package/modern/createStyled/index.d.ts +0 -2
  94. package/modern/createTheme/applyStyles.d.ts +0 -67
  95. package/modern/createTheme/createSpacing.d.ts +0 -10
  96. package/modern/createTheme/createTheme.d.ts +0 -54
  97. package/modern/createTheme/index.d.ts +0 -4
  98. package/modern/createTheme/shape.d.ts +0 -6
  99. package/modern/cssContainerQueries/cssContainerQueries.d.ts +0 -23
  100. package/modern/cssContainerQueries/index.d.ts +0 -3
  101. package/modern/cssGrid/cssGrid.d.ts +0 -15
  102. package/modern/cssGrid/index.d.ts +0 -2
  103. package/modern/cssVars/createCssVarsProvider.d.ts +0 -141
  104. package/modern/cssVars/createCssVarsTheme.d.ts +0 -15
  105. package/modern/cssVars/createGetCssVar.d.ts +0 -5
  106. package/modern/cssVars/cssVarsParser.d.ts +0 -64
  107. package/modern/cssVars/getColorSchemeSelector.d.ts +0 -1
  108. package/modern/cssVars/index.d.ts +0 -8
  109. package/modern/cssVars/localStorageManager.d.ts +0 -34
  110. package/modern/cssVars/prepareCssVars.d.ts +0 -16
  111. package/modern/cssVars/prepareTypographyVars.d.ts +0 -4
  112. package/modern/cssVars/useCurrentColorScheme.d.ts +0 -56
  113. package/modern/display/display.d.ts +0 -3
  114. package/modern/display/index.d.ts +0 -2
  115. package/modern/flexbox/flexbox.d.ts +0 -3
  116. package/modern/flexbox/index.d.ts +0 -2
  117. package/modern/getThemeValue/getThemeValue.d.ts +0 -1
  118. package/modern/getThemeValue/index.d.ts +0 -2
  119. package/modern/index.d.ts +0 -80
  120. package/modern/memoTheme.d.ts +0 -12
  121. package/modern/memoize/index.d.ts +0 -1
  122. package/modern/memoize/memoize.d.ts +0 -1
  123. package/modern/merge/index.d.ts +0 -1
  124. package/modern/merge/merge.d.ts +0 -1
  125. package/modern/palette/index.d.ts +0 -2
  126. package/modern/palette/palette.d.ts +0 -5
  127. package/modern/positions/index.d.ts +0 -2
  128. package/modern/positions/positions.d.ts +0 -3
  129. package/modern/preprocessStyles.d.ts +0 -5
  130. package/modern/propsToClassKey/index.d.ts +0 -1
  131. package/modern/propsToClassKey/propsToClassKey.d.ts +0 -1
  132. package/modern/responsivePropType/index.d.ts +0 -1
  133. package/modern/responsivePropType/responsivePropType.d.ts +0 -2
  134. package/modern/shadows/index.d.ts +0 -1
  135. package/modern/shadows/shadows.d.ts +0 -3
  136. package/modern/sizing/index.d.ts +0 -2
  137. package/modern/sizing/sizing.d.ts +0 -12
  138. package/modern/spacing/index.d.ts +0 -2
  139. package/modern/spacing/spacing.d.ts +0 -19
  140. package/modern/style/index.d.ts +0 -2
  141. package/modern/style/style.d.ts +0 -19
  142. package/modern/styleFunctionSx/AliasesCSSProperties.d.ts +0 -269
  143. package/modern/styleFunctionSx/OverwriteCSSProperties.d.ts +0 -54
  144. package/modern/styleFunctionSx/StandardCssProperties.d.ts +0 -2
  145. package/modern/styleFunctionSx/defaultSxConfig.d.ts +0 -15
  146. package/modern/styleFunctionSx/extendSxProp.d.ts +0 -4
  147. package/modern/styleFunctionSx/index.d.ts +0 -9
  148. package/modern/styleFunctionSx/styleFunctionSx.d.ts +0 -62
  149. package/modern/styled/index.d.ts +0 -1
  150. package/modern/styled/styled.d.ts +0 -3
  151. package/modern/typography/index.d.ts +0 -2
  152. package/modern/typography/typography.d.ts +0 -12
  153. package/modern/useMediaQuery/index.d.ts +0 -2
  154. package/modern/useMediaQuery/useMediaQuery.d.ts +0 -32
  155. package/modern/useTheme/index.d.ts +0 -2
  156. package/modern/useTheme/useTheme.d.ts +0 -2
  157. package/modern/useThemeProps/getThemeProps.d.ts +0 -11
  158. package/modern/useThemeProps/index.d.ts +0 -3
  159. package/modern/useThemeProps/useThemeProps.d.ts +0 -14
  160. package/modern/useThemeWithoutDefault/index.d.ts +0 -1
  161. package/modern/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +0 -1
  162. package/modern/version/index.d.ts +0 -6
package/Box/Box.d.ts CHANGED
@@ -2,37 +2,18 @@ import * as React from 'react';
2
2
  import { OverridableComponent, OverrideProps } from '@mui/types';
3
3
  import { Theme as SystemTheme } from "../createTheme/index.js";
4
4
  import { SxProps, AllSystemCSSProperties, ResponsiveStyleValue, OverwriteCSSProperties, AliasesCSSProperties } from "../styleFunctionSx/index.js";
5
- export type PropsFor<SomeStyleFunction> = SomeStyleFunction extends StyleFunction<infer Props> ? Props : never;
6
- export type StyleFunction<Props> = (props: Props) => any;
7
- export type SimpleStyleFunction<PropKey extends keyof any> = StyleFunction<Partial<Record<PropKey, any>>> & {
8
- filterProps: string[];
9
- };
10
-
11
- // borders.js
12
- export declare const borders: SimpleStyleFunction<'border' | 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft' | 'borderColor' | 'borderRadius'>;
13
- export declare const display: SimpleStyleFunction<'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace'>;
14
- export declare const flexbox: SimpleStyleFunction<'flexBasis' | 'flexDirection' | 'flexWrap' | 'justifyContent' | 'alignItems' | 'alignContent' | 'order' | 'flex' | 'flexGrow' | 'flexShrink' | 'alignSelf' | 'justifyItems' | 'justifySelf'>;
15
- export declare const grid: SimpleStyleFunction<'gap' | 'columnGap' | 'rowGap' | 'gridColumn' | 'gridRow' | 'gridAutoFlow' | 'gridAutoColumns' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'gridTemplateAreas' | 'gridArea'>;
16
- export declare const palette: SimpleStyleFunction<'bgcolor' | 'color'>;
17
- export declare const positions: SimpleStyleFunction<'zIndex' | 'position' | 'top' | 'right' | 'bottom' | 'left'>;
18
- export declare const shadows: SimpleStyleFunction<'boxShadow'>;
19
- export declare const sizing: SimpleStyleFunction<'width' | 'maxWidth' | 'minWidth' | 'height' | 'maxHeight' | 'minHeight' | 'sizeWidth' | 'sizeHeight' | 'boxSizing'>;
20
- export declare const spacing: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
21
- export declare const typography: SimpleStyleFunction<'typography' | 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'letterSpacing' | 'lineHeight' | 'textAlign' | 'textTransform'>;
22
-
23
- // compose.js
24
- /**
25
- * given a list of StyleFunction return the intersection of the props each individual
26
- * StyleFunction requires.
27
- *
28
- * If `firstFn` requires { color: string } and `secondFn` requires { spacing: number }
29
- * their composed function requires { color: string, spacing: number }
30
- */
31
- type ComposedArg<T> = T extends Array<(arg: infer P) => any> ? P : never;
32
- type ComposedOwnerState<T> = ComposedArg<T>;
33
- export type ComposedStyleFunction<T extends Array<StyleFunction<any>>> = StyleFunction<ComposedOwnerState<T>> & {
34
- filterProps: string[];
35
- };
5
+ import { PropsFor } from "../style/index.js";
6
+ import { ComposedStyleFunction } from "../compose/index.js";
7
+ import borders from "../borders/index.js";
8
+ import display from "../display/index.js";
9
+ import flexbox from "../flexbox/index.js";
10
+ import grid from "../cssGrid/index.js";
11
+ import palette from "../palette/index.js";
12
+ import positions from "../positions/index.js";
13
+ import shadows from "../shadows/index.js";
14
+ import sizing from "../sizing/index.js";
15
+ import spacing from "../spacing/index.js";
16
+ import typography from "../typography/index.js";
36
17
  export interface CustomSystemProps extends AliasesCSSProperties, OverwriteCSSProperties {}
37
18
  export type SimpleSystemKeys = keyof PropsFor<ComposedStyleFunction<[typeof borders, typeof display, typeof flexbox, typeof grid, typeof palette, typeof positions, typeof shadows, typeof sizing, typeof spacing, typeof typography]>>;
38
19
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,102 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.1.0
4
+
5
+ <!-- generated comparing v7.0.2..master -->
6
+
7
+ _May 6, 2025_
8
+
9
+ A big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🎉 Material UI now works with **Tailwind CSS v4**! Check out the [setup guide](https://mui.com/material-ui/integrations/tailwindcss/tailwindcss-v4/).
12
+
13
+ ### `@mui/material@7.1.0`
14
+
15
+ - [InputBase] Text cursor jumps several lines up when inserting text fragment with new line at the end (#45246) @yermartee
16
+ - [OutlinedInput] Add missing `notchedOutline` slot (#45917) @siriwatknp
17
+ - [Snackbar] Skip default `onClickAway` behavior when `defaultMuiPrevented` is provided (#45629) @sai6855
18
+ - [Avatar] Fix img slot types and add missing slots (#45483) @siriwatknp
19
+ - [Badge] Replace useSlotProps with useSlot hook (#45871) @sai6855
20
+ - [BottomNavigationAction] Add slots and slotProps (#45776) @sai6855
21
+ - [CardActionArea] Add slots and slotProps (#45866) @sai6855
22
+ - [useMediaQuery] Add warning and docs for using `useMediaQuery('print')` (#44790) @good-jinu
23
+ - Remove unnecessary clsx usages (#46084) @sai6855
24
+ - Corrected generic type definition in `SelectChangeEvent` (#45941) @SuyashShukla0007
25
+ - Fix theme object changes between renders (#45863) @siriwatknp
26
+
27
+ ### `@mui/material-nextjs@7.1.0`
28
+
29
+ - Add option to enable CSS layers for pages router (#45596) @siriwatknp
30
+ - Do not wrap `@layer` order rules in App Router (#45864) @Nayeem-XTREME
31
+
32
+ ### `@mui/system@7.1.0`
33
+
34
+ - Fix `@mui/system` types organization (#45860) @Janpot
35
+
36
+ ### `@mui/styled-engine@7.1.0`
37
+
38
+ - Infer `ownerState` from props in `styled` (#46083) @siriwatknp
39
+ - Fix style overrides variants type (#45478) @siriwatknp
40
+
41
+ ### Docs
42
+
43
+ - [Avatar] Add avatar upload demo (#45986) @Demianeen
44
+ - [Dialog] Remove deprecated props usage in demos (#45923) @sai6855
45
+ - [Menu] Update `paper` slot JSDoc default from `Paper` to `PopoverPaper` (#45722) @andreachiera
46
+ - [examples] Remove create-react-app usages (#45426) @CodeLeom
47
+ - Add `AccordionSummary` to the v5 breaking change migration (#45947) @siriwatknp
48
+ - Update CSS variable usage in migration guide for Pigment CSS (#46033) @sai6855
49
+ - Fix docs API dark mode color (#46086) @alexfauquette
50
+ - Add a guide for extending Material UI classes in Tailwind CSS (#46039) @siriwatknp
51
+ - Add `InitColorSchemeScript` docs and API (#45927) @siriwatknp
52
+ - Add Tailwind CSS v4 integration guide (#45906) @siriwatknp
53
+ - Fix 301 links to the system v6 (#45931) @oliviertassinari
54
+ - Add notification for MUI X v8 announcement (#45942) @joserodolfofreitas
55
+ - Fix som 301 redirections (ae84b35) @oliviertassinari
56
+ - Fix some 301 redirections (057384e) @oliviertassinari
57
+ - Fix logo is not centered on small screens (#45920) @crabsim
58
+ - Fix line break typo (a2a62d5) @oliviertassinari
59
+ - Fix markdown typo in templates.md (#45914) @scyzoryck
60
+ - Add Next.js App Router guide for custom classnames (#45852) @siriwatknp
61
+
62
+ ### Core
63
+
64
+ - [code-infra] Give a stable name to dev tool app (3889ded) @oliviertassinari
65
+ - [code-infra] Normalize author package in org (8135638) @oliviertassinari
66
+ - [code-infra] Correct some manually curated .d.ts files (#46054) @Janpot
67
+ - [code-infra] Align deps versions (#46048) @Janpot
68
+ - [code-infra] Fix dynamic import in imports resolver (#46046) @Janpot
69
+ - [code-infra] Eliminate `@mui/utils` deep imports (#46004) @Janpot
70
+ - [code-infra] Expand renovate.json for react types (#45935) @Janpot
71
+ - [code-infra] Make Argos upload script reusable (#45883) @Janpot
72
+ - [code-infra] Disallow redundant window prefixes for globals (#45880) @Janpot
73
+ - [code-infra] Remove type generation of modern build (#45912) @Janpot
74
+ - [code-infra] Clean up bundle size checker (#45622) @Janpot
75
+ - [code-infra] Fix `StrictMode` effects not being called twice in React 19 tests (#45812) @bernardobelchior
76
+ - [code-infra] Convert `@mui/utils` to typescript (#45671) @Janpot
77
+ - [docs-infra] Improve export into sandbox package.json (#46044) @oliviertassinari
78
+ - [docs-infra] Update feedback Node.js to v22 (#46064) @oliviertassinari
79
+ - [docs-infra] Normalize netlify.toml in org (b101d5c) @oliviertassinari
80
+ - [docs-infra] Uniformize Vale between repositories (0f79796) @oliviertassinari
81
+ - [docs-infra] Fix Vale no longer working (#46029) @oliviertassinari
82
+ - [docs-infra] Remove demo styling switch (#45926) @Janpot
83
+ - [docs-infra] StackBlitz WebContainer demos (#45924) @Janpot
84
+ - [docs-infra] Fix feedback management (#45872) @alexfauquette
85
+ - [test] Replace `playwright` with `@playwright/test` (#45998) @ZeeshanTamboli
86
+ - Fix internal version duplication (#46051) @oliviertassinari
87
+ - Avoid the need for `@mui/material/themeCssVarsAugmentation` (#46053) @Janpot
88
+ - Add security label to dependabot PRs (0a5c027) @oliviertassinari
89
+ - Remove unecessary versions (#46034) @oliviertassinari
90
+ - Remove redundant overrides resolver (#45970) @romgrk
91
+ - Fix duplicate branch reference (#45915) @oliviertassinari
92
+ - Fix outdated <link rel="shortcut icon" (#45916) @oliviertassinari
93
+ - Fix redirection chains (#45930) @oliviertassinari
94
+ - Run pnpm docs:sync-team (beee09f) @oliviertassinari
95
+ - Add `pkg.pr.new` publishing (#42984) @Aslemammad
96
+ - Remove @mui/base from the master branch (#45857) @mnajdova
97
+
98
+ All contributors of this release in alphabetical order: @alexfauquette, @andreachiera, @Aslemammad, @bernardobelchior, @CodeLeom, @crabsim, @Demianeen, @good-jinu, @Janpot, @joserodolfofreitas, @mnajdova, @Nayeem-XTREME, @oliviertassinari, @renovate[bot], @romgrk, @sai6855, @scyzoryck, @siriwatknp, @SuyashShukla0007, @yermartee, @ZeeshanTamboli
99
+
3
100
  ## 7.0.2
4
101
 
5
102
  _Apr 9, 2025_
@@ -26,8 +26,7 @@ const defaultTheme = (0, _createTheme.default)();
26
26
  // widening Theme to any so that the consumer can own the theme structure.
27
27
  const defaultCreateStyledComponent = (0, _styled.default)('div', {
28
28
  name: 'MuiGrid',
29
- slot: 'Root',
30
- overridesResolver: (props, styles) => styles.root
29
+ slot: 'Root'
31
30
  });
32
31
  function useThemePropsDefault(props) {
33
32
  return (0, _useThemeProps.default)({
@@ -39,7 +39,7 @@ function InitColorSchemeScript(options) {
39
39
  setter += `${colorSchemeNode}.classList.remove('${selector}'.replace('%s', light), '${selector}'.replace('%s', dark));
40
40
  ${colorSchemeNode}.classList.add('${selector}'.replace('%s', colorScheme));`;
41
41
  }
42
- const matches = attribute.match(/\[([^\]]+)\]/); // case [data-color-scheme=%s] or [data-color-scheme]
42
+ const matches = attribute.match(/\[([^\]]+)\]/); // case [data-color-scheme='%s'] or [data-color-scheme]
43
43
  if (matches) {
44
44
  const [attr, value] = matches[1].split('=');
45
45
  if (!value) {
@@ -25,8 +25,7 @@ const defaultTheme = (0, _createTheme.default)();
25
25
  // widening Theme to any so that the consumer can own the theme structure.
26
26
  const defaultCreateStyledComponent = (0, _styled.default)('div', {
27
27
  name: 'MuiStack',
28
- slot: 'Root',
29
- overridesResolver: (props, styles) => styles.root
28
+ slot: 'Root'
30
29
  });
31
30
  function useThemePropsDefault(props) {
32
31
  return (0, _useThemeProps.default)({
@@ -1,4 +1,4 @@
1
- import { PropsFor, borders, SimpleStyleFunction } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
2
  export const border: SimpleStyleFunction<'border'>;
3
3
  export const borderTop: SimpleStyleFunction<'borderTop'>;
4
4
  export const borderRight: SimpleStyleFunction<'borderRight'>;
@@ -10,5 +10,6 @@ export const borderRightColor: SimpleStyleFunction<'borderRightColor'>;
10
10
  export const borderBottomColor: SimpleStyleFunction<'borderBottomColor'>;
11
11
  export const borderLeftColor: SimpleStyleFunction<'borderLeftColor'>;
12
12
  export const borderRadius: SimpleStyleFunction<'borderRadius'>;
13
+ declare const borders: SimpleStyleFunction<'border' | 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft' | 'borderColor' | 'borderRadius'>;
13
14
  export type BordersProps = PropsFor<typeof borders>;
14
15
  export default borders;
@@ -2,7 +2,7 @@ import { CSSObject } from '@mui/styled-engine';
2
2
  import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
3
3
  import type { Breakpoint } from "../createTheme/index.js";
4
4
  import { ResponsiveStyleValue } from "../styleFunctionSx/index.js";
5
- import { StyleFunction } from "../Box/index.js";
5
+ import { StyleFunction } from "../style/index.js";
6
6
  export interface ResolveBreakpointValuesOptions<T> {
7
7
  values: ResponsiveStyleValue<T>;
8
8
  breakpoints?: Breakpoints['values'];
@@ -1,2 +1,15 @@
1
- import { ComposedStyleFunction, StyleFunction } from "../Box/index.js";
1
+ import { StyleFunction } from "../style/index.js";
2
+
3
+ /**
4
+ * given a list of StyleFunction return the intersection of the props each individual
5
+ * StyleFunction requires.
6
+ *
7
+ * If `firstFn` requires { color: string } and `secondFn` requires { spacing: number }
8
+ * their composed function requires { color: string, spacing: number }
9
+ */
10
+ type ComposedArg<T> = T extends Array<(arg: infer P) => any> ? P : never;
11
+ type ComposedOwnerState<T> = ComposedArg<T>;
12
+ export type ComposedStyleFunction<T extends Array<StyleFunction<any>>> = StyleFunction<ComposedOwnerState<T>> & {
13
+ filterProps: string[];
14
+ };
2
15
  export default function compose<T extends Array<StyleFunction<any>>>(...args: T): ComposedStyleFunction<T>;
@@ -1 +1 @@
1
- export { default } from "./compose.js";
1
+ export { default, type ComposedStyleFunction } from "./compose.js";
@@ -1,4 +1,4 @@
1
- import { PropsFor, grid, SimpleStyleFunction } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
2
  export const gap: SimpleStyleFunction<'gap'>;
3
3
  export const columnGap: SimpleStyleFunction<'columnGap'>;
4
4
  export const rowGap: SimpleStyleFunction<'rowGap'>;
@@ -11,5 +11,6 @@ export const gridTemplateColumns: SimpleStyleFunction<'gridTemplateColumns'>;
11
11
  export const gridTemplateRows: SimpleStyleFunction<'gridTemplateRows'>;
12
12
  export const gridTemplateAreas: SimpleStyleFunction<'gridTemplateAreas'>;
13
13
  export const gridArea: SimpleStyleFunction<'gridArea'>;
14
+ declare const grid: SimpleStyleFunction<'gap' | 'columnGap' | 'rowGap' | 'gridColumn' | 'gridRow' | 'gridAutoFlow' | 'gridAutoColumns' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'gridTemplateAreas' | 'gridArea'>;
14
15
  export type CssGridProps = PropsFor<typeof grid>;
15
16
  export default grid;
@@ -1,3 +1,4 @@
1
- import { PropsFor, display } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ declare const display: SimpleStyleFunction<'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace'>;
2
3
  export type DisplayProps = PropsFor<typeof display>;
3
4
  export default display;
package/esm/Box/Box.d.ts CHANGED
@@ -2,37 +2,18 @@ import * as React from 'react';
2
2
  import { OverridableComponent, OverrideProps } from '@mui/types';
3
3
  import { Theme as SystemTheme } from "../createTheme/index.js";
4
4
  import { SxProps, AllSystemCSSProperties, ResponsiveStyleValue, OverwriteCSSProperties, AliasesCSSProperties } from "../styleFunctionSx/index.js";
5
- export type PropsFor<SomeStyleFunction> = SomeStyleFunction extends StyleFunction<infer Props> ? Props : never;
6
- export type StyleFunction<Props> = (props: Props) => any;
7
- export type SimpleStyleFunction<PropKey extends keyof any> = StyleFunction<Partial<Record<PropKey, any>>> & {
8
- filterProps: string[];
9
- };
10
-
11
- // borders.js
12
- export declare const borders: SimpleStyleFunction<'border' | 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft' | 'borderColor' | 'borderRadius'>;
13
- export declare const display: SimpleStyleFunction<'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace'>;
14
- export declare const flexbox: SimpleStyleFunction<'flexBasis' | 'flexDirection' | 'flexWrap' | 'justifyContent' | 'alignItems' | 'alignContent' | 'order' | 'flex' | 'flexGrow' | 'flexShrink' | 'alignSelf' | 'justifyItems' | 'justifySelf'>;
15
- export declare const grid: SimpleStyleFunction<'gap' | 'columnGap' | 'rowGap' | 'gridColumn' | 'gridRow' | 'gridAutoFlow' | 'gridAutoColumns' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'gridTemplateAreas' | 'gridArea'>;
16
- export declare const palette: SimpleStyleFunction<'bgcolor' | 'color'>;
17
- export declare const positions: SimpleStyleFunction<'zIndex' | 'position' | 'top' | 'right' | 'bottom' | 'left'>;
18
- export declare const shadows: SimpleStyleFunction<'boxShadow'>;
19
- export declare const sizing: SimpleStyleFunction<'width' | 'maxWidth' | 'minWidth' | 'height' | 'maxHeight' | 'minHeight' | 'sizeWidth' | 'sizeHeight' | 'boxSizing'>;
20
- export declare const spacing: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
21
- export declare const typography: SimpleStyleFunction<'typography' | 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'letterSpacing' | 'lineHeight' | 'textAlign' | 'textTransform'>;
22
-
23
- // compose.js
24
- /**
25
- * given a list of StyleFunction return the intersection of the props each individual
26
- * StyleFunction requires.
27
- *
28
- * If `firstFn` requires { color: string } and `secondFn` requires { spacing: number }
29
- * their composed function requires { color: string, spacing: number }
30
- */
31
- type ComposedArg<T> = T extends Array<(arg: infer P) => any> ? P : never;
32
- type ComposedOwnerState<T> = ComposedArg<T>;
33
- export type ComposedStyleFunction<T extends Array<StyleFunction<any>>> = StyleFunction<ComposedOwnerState<T>> & {
34
- filterProps: string[];
35
- };
5
+ import { PropsFor } from "../style/index.js";
6
+ import { ComposedStyleFunction } from "../compose/index.js";
7
+ import borders from "../borders/index.js";
8
+ import display from "../display/index.js";
9
+ import flexbox from "../flexbox/index.js";
10
+ import grid from "../cssGrid/index.js";
11
+ import palette from "../palette/index.js";
12
+ import positions from "../positions/index.js";
13
+ import shadows from "../shadows/index.js";
14
+ import sizing from "../sizing/index.js";
15
+ import spacing from "../spacing/index.js";
16
+ import typography from "../typography/index.js";
36
17
  export interface CustomSystemProps extends AliasesCSSProperties, OverwriteCSSProperties {}
37
18
  export type SimpleSystemKeys = keyof PropsFor<ComposedStyleFunction<[typeof borders, typeof display, typeof flexbox, typeof grid, typeof palette, typeof positions, typeof shadows, typeof sizing, typeof spacing, typeof typography]>>;
38
19
 
@@ -19,8 +19,7 @@ const defaultTheme = createTheme();
19
19
  // widening Theme to any so that the consumer can own the theme structure.
20
20
  const defaultCreateStyledComponent = systemStyled('div', {
21
21
  name: 'MuiGrid',
22
- slot: 'Root',
23
- overridesResolver: (props, styles) => styles.root
22
+ slot: 'Root'
24
23
  });
25
24
  function useThemePropsDefault(props) {
26
25
  return useThemePropsSystem({
@@ -30,7 +30,7 @@ export default function InitColorSchemeScript(options) {
30
30
  setter += `${colorSchemeNode}.classList.remove('${selector}'.replace('%s', light), '${selector}'.replace('%s', dark));
31
31
  ${colorSchemeNode}.classList.add('${selector}'.replace('%s', colorScheme));`;
32
32
  }
33
- const matches = attribute.match(/\[([^\]]+)\]/); // case [data-color-scheme=%s] or [data-color-scheme]
33
+ const matches = attribute.match(/\[([^\]]+)\]/); // case [data-color-scheme='%s'] or [data-color-scheme]
34
34
  if (matches) {
35
35
  const [attr, value] = matches[1].split('=');
36
36
  if (!value) {
@@ -17,8 +17,7 @@ const defaultTheme = createTheme();
17
17
  // widening Theme to any so that the consumer can own the theme structure.
18
18
  const defaultCreateStyledComponent = systemStyled('div', {
19
19
  name: 'MuiStack',
20
- slot: 'Root',
21
- overridesResolver: (props, styles) => styles.root
20
+ slot: 'Root'
22
21
  });
23
22
  function useThemePropsDefault(props) {
24
23
  return useThemePropsSystem({
@@ -1,4 +1,4 @@
1
- import { PropsFor, borders, SimpleStyleFunction } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
2
  export const border: SimpleStyleFunction<'border'>;
3
3
  export const borderTop: SimpleStyleFunction<'borderTop'>;
4
4
  export const borderRight: SimpleStyleFunction<'borderRight'>;
@@ -10,5 +10,6 @@ export const borderRightColor: SimpleStyleFunction<'borderRightColor'>;
10
10
  export const borderBottomColor: SimpleStyleFunction<'borderBottomColor'>;
11
11
  export const borderLeftColor: SimpleStyleFunction<'borderLeftColor'>;
12
12
  export const borderRadius: SimpleStyleFunction<'borderRadius'>;
13
+ declare const borders: SimpleStyleFunction<'border' | 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft' | 'borderColor' | 'borderRadius'>;
13
14
  export type BordersProps = PropsFor<typeof borders>;
14
15
  export default borders;
@@ -2,7 +2,7 @@ import { CSSObject } from '@mui/styled-engine';
2
2
  import { Breakpoints } from "../createBreakpoints/createBreakpoints.js";
3
3
  import type { Breakpoint } from "../createTheme/index.js";
4
4
  import { ResponsiveStyleValue } from "../styleFunctionSx/index.js";
5
- import { StyleFunction } from "../Box/index.js";
5
+ import { StyleFunction } from "../style/index.js";
6
6
  export interface ResolveBreakpointValuesOptions<T> {
7
7
  values: ResponsiveStyleValue<T>;
8
8
  breakpoints?: Breakpoints['values'];
@@ -1,2 +1,15 @@
1
- import { ComposedStyleFunction, StyleFunction } from "../Box/index.js";
1
+ import { StyleFunction } from "../style/index.js";
2
+
3
+ /**
4
+ * given a list of StyleFunction return the intersection of the props each individual
5
+ * StyleFunction requires.
6
+ *
7
+ * If `firstFn` requires { color: string } and `secondFn` requires { spacing: number }
8
+ * their composed function requires { color: string, spacing: number }
9
+ */
10
+ type ComposedArg<T> = T extends Array<(arg: infer P) => any> ? P : never;
11
+ type ComposedOwnerState<T> = ComposedArg<T>;
12
+ export type ComposedStyleFunction<T extends Array<StyleFunction<any>>> = StyleFunction<ComposedOwnerState<T>> & {
13
+ filterProps: string[];
14
+ };
2
15
  export default function compose<T extends Array<StyleFunction<any>>>(...args: T): ComposedStyleFunction<T>;
@@ -1 +1 @@
1
- export { default } from "./compose.js";
1
+ export { default, type ComposedStyleFunction } from "./compose.js";
@@ -1,4 +1,4 @@
1
- import { PropsFor, grid, SimpleStyleFunction } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
2
  export const gap: SimpleStyleFunction<'gap'>;
3
3
  export const columnGap: SimpleStyleFunction<'columnGap'>;
4
4
  export const rowGap: SimpleStyleFunction<'rowGap'>;
@@ -11,5 +11,6 @@ export const gridTemplateColumns: SimpleStyleFunction<'gridTemplateColumns'>;
11
11
  export const gridTemplateRows: SimpleStyleFunction<'gridTemplateRows'>;
12
12
  export const gridTemplateAreas: SimpleStyleFunction<'gridTemplateAreas'>;
13
13
  export const gridArea: SimpleStyleFunction<'gridArea'>;
14
+ declare const grid: SimpleStyleFunction<'gap' | 'columnGap' | 'rowGap' | 'gridColumn' | 'gridRow' | 'gridAutoFlow' | 'gridAutoColumns' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'gridTemplateAreas' | 'gridArea'>;
14
15
  export type CssGridProps = PropsFor<typeof grid>;
15
16
  export default grid;
@@ -1,3 +1,4 @@
1
- import { PropsFor, display } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ declare const display: SimpleStyleFunction<'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace'>;
2
3
  export type DisplayProps = PropsFor<typeof display>;
3
4
  export default display;
@@ -1,3 +1,17 @@
1
- import { PropsFor, flexbox } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ export const flexBasis: SimpleStyleFunction<'flexBasis'>;
3
+ export const flexDirection: SimpleStyleFunction<'flexDirection'>;
4
+ export const flexWrap: SimpleStyleFunction<'flexWrap'>;
5
+ export const justifyContent: SimpleStyleFunction<'justifyContent'>;
6
+ export const alignItems: SimpleStyleFunction<'alignItems'>;
7
+ export const alignContent: SimpleStyleFunction<'alignContent'>;
8
+ export const order: SimpleStyleFunction<'order'>;
9
+ export const flex: SimpleStyleFunction<'flex'>;
10
+ export const flexGrow: SimpleStyleFunction<'flexGrow'>;
11
+ export const flexShrink: SimpleStyleFunction<'flexShrink'>;
12
+ export const alignSelf: SimpleStyleFunction<'alignSelf'>;
13
+ export const justifyItems: SimpleStyleFunction<'justifyItems'>;
14
+ export const justifySelf: SimpleStyleFunction<'justifySelf'>;
15
+ declare const flexbox: SimpleStyleFunction<'flexBasis' | 'flexDirection' | 'flexWrap' | 'justifyContent' | 'alignItems' | 'alignContent' | 'order' | 'flex' | 'flexGrow' | 'flexShrink' | 'alignSelf' | 'justifyItems' | 'justifySelf'>;
2
16
  export type FlexboxProps = PropsFor<typeof flexbox>;
3
17
  export default flexbox;
package/esm/index.d.ts CHANGED
@@ -1,17 +1,26 @@
1
1
  // disable automatic export
2
2
  export {};
3
3
  export * from "./borders/index.js";
4
+ export { default as borders } from "./borders/index.js";
4
5
  export { default as breakpoints, handleBreakpoints, mergeBreakpointsInOrder } from "./breakpoints/index.js";
5
6
  export { default as cssContainerQueries, type CssContainerQueries } from "./cssContainerQueries/index.js";
6
7
  export { default as compose } from "./compose/index.js";
7
8
  export * from "./display/index.js";
9
+ export { default as display } from "./display/index.js";
8
10
  export * from "./flexbox/index.js";
11
+ export { default as flexbox } from "./flexbox/index.js";
9
12
  export * from "./cssGrid/index.js";
13
+ export { default as grid } from "./cssGrid/index.js";
10
14
  export * from "./palette/index.js";
15
+ export { default as palette } from "./palette/index.js";
11
16
  export * from "./positions/index.js";
17
+ export { default as positions } from "./positions/index.js";
12
18
  export * from "./shadows/index.js";
19
+ export { default as shadows } from "./shadows/index.js";
13
20
  export * from "./sizing/index.js";
21
+ export { default as sizing } from "./sizing/index.js";
14
22
  export * from "./typography/index.js";
23
+ export { default as typography } from "./typography/index.js";
15
24
  export { default as unstable_getThemeValue } from "./getThemeValue/index.js";
16
25
 
17
26
  /**
@@ -29,6 +38,7 @@ export type { GlobalStylesProps } from "./GlobalStyles/index.js";
29
38
  export * from "./style/index.js";
30
39
  export { default as style } from "./style/index.js";
31
40
  export * from "./spacing/index.js";
41
+ export { default as spacing } from "./spacing/index.js";
32
42
  export { default as unstable_styleFunctionSx, unstable_createStyleFunctionSx, extendSxProp as unstable_extendSxProp, unstable_defaultSxConfig } from "./styleFunctionSx/index.js";
33
43
  export * from "./styleFunctionSx/index.js";
34
44
 
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v7.0.2
2
+ * @mui/system v7.1.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,5 +1,6 @@
1
- import { PropsFor, SimpleStyleFunction, palette } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
2
  export const color: SimpleStyleFunction<'color'>;
3
3
  export const bgcolor: SimpleStyleFunction<'bgcolor'>;
4
+ declare const palette: SimpleStyleFunction<'bgcolor' | 'color'>;
4
5
  export type PaletteProps = PropsFor<typeof palette>;
5
6
  export default palette;
@@ -1,3 +1,4 @@
1
- import { PropsFor, positions } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ declare const positions: SimpleStyleFunction<'zIndex' | 'position' | 'top' | 'right' | 'bottom' | 'left'>;
2
3
  export type PositionsProps = PropsFor<typeof positions>;
3
4
  export default positions;
@@ -1,3 +1,4 @@
1
- import { PropsFor, shadows } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ declare const shadows: SimpleStyleFunction<'boxShadow'>;
2
3
  export type ShadowsProps = PropsFor<typeof shadows>;
3
4
  export default shadows;
@@ -1,4 +1,4 @@
1
- import { PropsFor, SimpleStyleFunction, sizing } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
2
  export const width: SimpleStyleFunction<'width'>;
3
3
  export const maxWidth: SimpleStyleFunction<'maxWidth'>;
4
4
  export const minWidth: SimpleStyleFunction<'minWidth'>;
@@ -8,5 +8,6 @@ export const minHeight: SimpleStyleFunction<'minHeight'>;
8
8
  export const sizeWidth: SimpleStyleFunction<'sizeWidth'>;
9
9
  export const sizeHeight: SimpleStyleFunction<'sizeHeight'>;
10
10
  export const boxSizing: SimpleStyleFunction<'boxSizing'>;
11
+ declare const sizing: SimpleStyleFunction<'width' | 'maxWidth' | 'minWidth' | 'height' | 'maxHeight' | 'minHeight' | 'sizeWidth' | 'sizeHeight' | 'boxSizing'>;
11
12
  export type SizingProps = PropsFor<typeof sizing>;
12
13
  export default sizing;
@@ -1,4 +1,4 @@
1
- import { SimpleStyleFunction, spacing, PropsFor } from "../Box/index.js";
1
+ import { SimpleStyleFunction, PropsFor } from "../style/index.js";
2
2
  export type SpacingValueType = string | number | null | undefined;
3
3
  export type SpacingProps = PropsFor<typeof spacing>;
4
4
  export function createUnarySpacing<Spacing>(theme: {
@@ -14,6 +14,7 @@ export function createUnaryUnit<Spacing>(theme: {
14
14
  export const margin: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd'>;
15
15
  export type MarginProps = PropsFor<typeof margin>;
16
16
  export const padding: SimpleStyleFunction<'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
17
+ declare const spacing: SimpleStyleFunction<'m' | 'mt' | 'mr' | 'mb' | 'ml' | 'mx' | 'my' | 'p' | 'pt' | 'pr' | 'pb' | 'pl' | 'px' | 'py' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginX' | 'marginY' | 'marginInline' | 'marginInlineStart' | 'marginInlineEnd' | 'marginBlock' | 'marginBlockStart' | 'marginBlockEnd' | 'padding' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'paddingX' | 'paddingY' | 'paddingInline' | 'paddingInlineStart' | 'paddingInlineEnd' | 'paddingBlock' | 'paddingBlockStart' | 'paddingBlockEnd'>;
17
18
  export function getValue(transformer: (prop: SpacingValueType) => SpacingValueType, propValue: SpacingValueType): SpacingValueType;
18
19
  export type PaddingProps = PropsFor<typeof padding>;
19
20
  export default spacing;
@@ -1,5 +1,9 @@
1
1
  import { CSSObject } from '@mui/styled-engine';
2
- import { StyleFunction } from "../Box/index.js";
2
+ export type PropsFor<SomeStyleFunction> = SomeStyleFunction extends StyleFunction<infer Props> ? Props : never;
3
+ export type StyleFunction<Props> = (props: Props) => any;
4
+ export type SimpleStyleFunction<PropKey extends keyof any> = StyleFunction<Partial<Record<PropKey, any>>> & {
5
+ filterProps: string[];
6
+ };
3
7
  export type TransformFunction = (cssValue: unknown, userValue: unknown) => number | string | React.CSSProperties | CSSObject;
4
8
  export interface StyleOptions<PropKey> {
5
9
  cssProperty?: PropKey | keyof React.CSSProperties | false;
@@ -1,5 +1,4 @@
1
- import { StyleFunction } from "../Box/index.js";
2
- import { TransformFunction } from "../style/index.js";
1
+ import { StyleFunction, TransformFunction } from "../style/index.js";
3
2
  type SimpleStyleFunction<PropKey extends keyof any> = StyleFunction<Partial<Record<PropKey, any>>>;
4
3
  export interface SxConfigRecord {
5
4
  cssProperty?: keyof React.CSSProperties | false;
@@ -1,4 +1,4 @@
1
- import { PropsFor, SimpleStyleFunction, typography } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
2
  export const typographyVariant: SimpleStyleFunction<'typography'>;
3
3
  export const fontFamily: SimpleStyleFunction<'fontFamily'>;
4
4
  export const fontSize: SimpleStyleFunction<'fontSize'>;
@@ -8,5 +8,6 @@ export const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
8
8
  export const lineHeight: SimpleStyleFunction<'lineHeight'>;
9
9
  export const textAlign: SimpleStyleFunction<'textAlign'>;
10
10
  export const textTransform: SimpleStyleFunction<'textTransform'>;
11
+ declare const typography: SimpleStyleFunction<'typography' | 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'letterSpacing' | 'lineHeight' | 'textAlign' | 'textTransform'>;
11
12
  export type TypographyProps = PropsFor<typeof typography>;
12
13
  export default typography;
@@ -102,6 +102,9 @@ export function unstable_createUseMediaQuery(params = {}) {
102
102
  }
103
103
  let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
104
104
  query = query.replace(/^@media( ?)/m, '');
105
+ if (query.includes('print')) {
106
+ console.warn([`MUI: You have provided a \`print\` query to the \`useMediaQuery\` hook.`, 'Using the print media query to modify print styles can lead to unexpected results.', 'Consider using the `displayPrint` field in the `sx` prop instead.', 'More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print.'].join('\n'));
107
+ }
105
108
  const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
106
109
  const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
107
110
  if (process.env.NODE_ENV !== 'production') {
@@ -1,6 +1,6 @@
1
- export const version = "7.0.2";
1
+ export const version = "7.1.0";
2
2
  export const major = Number("7");
3
- export const minor = Number("0");
4
- export const patch = Number("2");
3
+ export const minor = Number("1");
4
+ export const patch = Number("0");
5
5
  export const prerelease = undefined;
6
6
  export default version;
@@ -1,3 +1,17 @@
1
- import { PropsFor, flexbox } from "../Box/index.js";
1
+ import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ export const flexBasis: SimpleStyleFunction<'flexBasis'>;
3
+ export const flexDirection: SimpleStyleFunction<'flexDirection'>;
4
+ export const flexWrap: SimpleStyleFunction<'flexWrap'>;
5
+ export const justifyContent: SimpleStyleFunction<'justifyContent'>;
6
+ export const alignItems: SimpleStyleFunction<'alignItems'>;
7
+ export const alignContent: SimpleStyleFunction<'alignContent'>;
8
+ export const order: SimpleStyleFunction<'order'>;
9
+ export const flex: SimpleStyleFunction<'flex'>;
10
+ export const flexGrow: SimpleStyleFunction<'flexGrow'>;
11
+ export const flexShrink: SimpleStyleFunction<'flexShrink'>;
12
+ export const alignSelf: SimpleStyleFunction<'alignSelf'>;
13
+ export const justifyItems: SimpleStyleFunction<'justifyItems'>;
14
+ export const justifySelf: SimpleStyleFunction<'justifySelf'>;
15
+ declare const flexbox: SimpleStyleFunction<'flexBasis' | 'flexDirection' | 'flexWrap' | 'justifyContent' | 'alignItems' | 'alignContent' | 'order' | 'flex' | 'flexGrow' | 'flexShrink' | 'alignSelf' | 'justifyItems' | 'justifySelf'>;
2
16
  export type FlexboxProps = PropsFor<typeof flexbox>;
3
17
  export default flexbox;