@mui/styled-engine 7.0.0-alpha.1 → 7.0.0-beta.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.0.0-beta.0
4
+
5
+ <!-- generated comparing v7.0.0-alpha.2..master -->
6
+
7
+ _Feb 26, 2025_
8
+
9
+ A big thanks to the 8 contributors who made this release possible.
10
+
11
+ ### `@mui/material@7.0.0-beta.0`
12
+
13
+ - [Modal][Dialog] Remove deprecated `onBackdropClick` (#45395) @DiegoAndai
14
+ - [Grid] Improve Grid2 upgrade experience (#45304) @DiegoAndai
15
+ - [Grid] Rename to GridLegacy (#45363) @DiegoAndai
16
+ - [Grid2] Rename to Grid (#45381) @DiegoAndai
17
+ - Remove SvgIcon data-testid in production (#45333) @Janpot
18
+ - Allow nested theme creation with `vars` (#45335) @siriwatknp
19
+ - [Rating] Deprecate \*Props and complete `slots`, `slotProps` (#45295) @harry-whorlow
20
+ - [Slider] Fix css class selector in migration guide (#45402) @sai6855
21
+ - [Slider] Fix spacings in .md files (#45388) @sai6855
22
+ - [styles] Remove deprecated exports (#45397) @DiegoAndai
23
+ - [Menu] Deprecate \*Props and complete `slots`, `slotProps` (#44913) @siriwatknp
24
+ - [StepButton] Remove StepIconButton type (#45396) @DiegoAndai
25
+
26
+ ### Docs
27
+
28
+ - [Autocomplete] Remove unnecessary renderTags prop from Sizes demo (#45401) @ZeeshanTamboli
29
+ - Add `overriding-component-structure` doc to Material UI (#45186) @siriwatknp
30
+ - Fix typo in slider docs (#45390) @sai6855
31
+ - Fix Context Menu selection lost on Safari (#44903) @NooBat
32
+
33
+ ### Core
34
+
35
+ - [code-infra] Fix types for @mui/styled-engine (#45413) @Janpot
36
+ - [docs-infra] Fix theme toggle call (#45400) @siriwatknp
37
+ - [docs-infra] Add `color-scheme` to document in iframe demos (#45406) @KenanYusuf
38
+ - [docs-infra] Revert to use deprecated `CssVarsProvider` for MUI X (#45371) @siriwatknp
39
+ - [docs-infra] Fix dark mode flicker for API pages (#45354) @siriwatknp
40
+ - [examples] Remove unnecessary comma in Material UI Vite JS example (#45370) @ZeeshanTamboli
41
+ - [test] Remove unused renderTags prop and fix key warning in Autocomplete regression test (#45410) @ZeeshanTamboli
42
+
43
+ All contributors of this release in alphabetical order: @DiegoAndai, @harry-whorlow, @Janpot, @KenanYusuf, @NooBat, @sai6855, @siriwatknp, @ZeeshanTamboli
44
+
45
+ ## 7.0.0-alpha.2
46
+
47
+ <!-- generated comparing v7.0.0-alpha.1..master -->
48
+
49
+ _Feb 18, 2025_
50
+
51
+ A big thanks to the 9 contributors who made this release possible.
52
+
53
+ ### `@mui/material@7.0.0-alpha.2`
54
+
55
+ - [Autocomplete] Remove legacy `aria-owns` attribute for combobox (#45302) @ZeeshanTamboli
56
+ - [Button] Apply id only if loading indicator is present (#45296) @aarongarciah
57
+ - [Hidden] Remove deprecated Hidden component (#45283) @DiegoAndai
58
+ - [InputBase] Deprecate composed classes (#45234) @sai6855
59
+ - [InputLabel] Changed size prop value from `normal` to `medium` (#45235) @perkrlsn
60
+ - Fix `slotProps.transition` types (#45214) @siriwatknp
61
+
62
+ ### Docs
63
+
64
+ - Fix broken links to MUI X docs (#45145) @mapache-salvaje
65
+ - Add migration guide for package layout changes (#45222) @Janpot
66
+ - [icons] Fix typo in material-icons.md (#45334) @a-s-russo
67
+
68
+ ### Core
69
+
70
+ - Disallow access to esm/modern barrel files (#45332) @Janpot
71
+ - [code-infra] Update `elliptic` (#45311) @Janpot
72
+ - Update release guide to specify package bumping rules (#45294) @DiegoAndai
73
+
74
+ All contributors of this release in alphabetical order: @a-s-russo, @aarongarciah, @DiegoAndai, @Janpot, @mapache-salvaje, @perkrlsn, @sai6855, @siriwatknp, @ZeeshanTamboli
75
+
3
76
  ## 7.0.0-alpha.1
4
77
 
5
78
  <!-- generated comparing v7.0.0-alpha.0..master -->
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { Interpolation } from '@emotion/react';
3
+ export interface GlobalStylesProps<Theme = {}> {
4
+ defaultTheme?: object;
5
+ styles: Interpolation<Theme>;
6
+ }
7
+ export default function GlobalStyles<Theme = {}>(props: GlobalStylesProps<Theme>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./GlobalStyles.js";
2
+ export * from "./GlobalStyles.js";
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export interface StyledEngineProviderProps {
3
+ children?: React.ReactNode;
4
+ injectFirst?: boolean;
5
+ }
6
+ export default function StyledEngineProvider(props: StyledEngineProviderProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./StyledEngineProvider.js";
2
+ export * from "./StyledEngineProvider.js";
package/esm/index.d.ts ADDED
@@ -0,0 +1,119 @@
1
+ import * as CSS from 'csstype';
2
+ import { StyledComponent, StyledOptions } from '@emotion/styled';
3
+ import { PropsOf } from '@emotion/react';
4
+ export * from '@emotion/styled';
5
+ export { default } from '@emotion/styled';
6
+ export { ThemeContext, keyframes, css } from '@emotion/react';
7
+ export { default as StyledEngineProvider } from "./StyledEngineProvider/index.js";
8
+ export { default as GlobalStyles } from "./GlobalStyles/index.js";
9
+ export * from "./GlobalStyles/index.js";
10
+ export type MUIStyledComponent<ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {}> = StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
11
+
12
+ /**
13
+ * For internal usage in `@mui/system` package
14
+ */
15
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
+ export function internal_mutateStyles(tag: React.ElementType, processor: (styles: any) => any): void;
17
+
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19
+ export function internal_serializeStyles<P>(styles: Interpolation<P>): object;
20
+ export interface SerializedStyles {
21
+ name: string;
22
+ styles: string;
23
+ map?: string;
24
+ next?: SerializedStyles;
25
+ }
26
+ export type CSSProperties = CSS.PropertiesFallback<number | string>;
27
+ export type CSSPropertiesWithMultiValues = { [K in keyof CSSProperties]: CSSProperties[K] | ReadonlyArray<Extract<CSSProperties[K], string>> };
28
+
29
+ // TODO v6 - check if we can drop the unknown, as it breaks the autocomplete
30
+ // For more info on why it was added, see https://github.com/mui/material-ui/pull/26228
31
+ export type CSSPseudos = { [K in CSS.Pseudos]?: unknown | CSSObject };
32
+
33
+ // TODO v6 - check if we can drop the unknown, as it breaks the autocomplete
34
+ // For more info on why it was added, see https://github.com/mui/material-ui/pull/26228
35
+ export interface CSSOthersObject {
36
+ [propertiesName: string]: unknown | CSSInterpolation;
37
+ }
38
+ export type CSSPseudosForCSSObject = { [K in CSS.Pseudos]?: CSSObject };
39
+ export interface ArrayCSSInterpolation extends ReadonlyArray<CSSInterpolation> {}
40
+ export interface CSSOthersObjectForCSSObject {
41
+ [propertiesName: string]: CSSInterpolation;
42
+ }
43
+
44
+ // Omit variants as a key, because we have a special handling for it
45
+ export interface CSSObject extends CSSPropertiesWithMultiValues, CSSPseudos, Omit<CSSOthersObject, 'variants'> {}
46
+ interface CSSObjectWithVariants<Props> extends Omit<CSSObject, 'variants'> {
47
+ variants: Array<{
48
+ props: Props | ((props: Props) => boolean);
49
+ style: CSSObject | ((args: Props extends {
50
+ theme: any;
51
+ } ? {
52
+ theme: Props['theme'];
53
+ } : any) => CSSObject);
54
+ }>;
55
+ }
56
+ export interface ComponentSelector {
57
+ __emotion_styles: any;
58
+ }
59
+ export type Keyframes = {
60
+ name: string;
61
+ styles: string;
62
+ anim: number;
63
+ toString: () => string;
64
+ } & string;
65
+ export type Equal<A, B, T, F> = A extends B ? (B extends A ? T : F) : F;
66
+ export type InterpolationPrimitive = null | undefined | boolean | number | string | ComponentSelector | Keyframes | SerializedStyles | CSSObject;
67
+ export type CSSInterpolation = InterpolationPrimitive | ArrayCSSInterpolation;
68
+ export interface FunctionInterpolation<Props> {
69
+ (props: Props): Interpolation<Props>;
70
+ }
71
+ export interface ArrayInterpolation<Props> extends ReadonlyArray<Interpolation<Props>> {}
72
+ export type Interpolation<Props> = InterpolationPrimitive | CSSObjectWithVariants<Props> | ArrayInterpolation<Props> | FunctionInterpolation<Props>;
73
+ export function shouldForwardProp(propName: PropertyKey): boolean;
74
+
75
+ /** Same as StyledOptions but shouldForwardProp must be a type guard */
76
+ export interface FilteringStyledOptions<Props, ForwardedProps extends keyof Props = keyof Props> {
77
+ label?: string;
78
+ shouldForwardProp?(propName: PropertyKey): propName is ForwardedProps;
79
+ target?: string;
80
+ }
81
+
82
+ /**
83
+ * @typeparam ComponentProps Props which will be included when withComponent is called
84
+ * @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called
85
+ */
86
+ export interface CreateStyledComponent<ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {}, T extends object = {}> {
87
+ (...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & {
88
+ theme: T;
89
+ }>>): StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
90
+
91
+ /**
92
+ * @typeparam AdditionalProps Additional props to add to your styled component
93
+ */
94
+ <AdditionalProps extends {}>(...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & AdditionalProps & {
95
+ theme: T;
96
+ }>>): StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
97
+ (template: TemplateStringsArray, ...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & {
98
+ theme: T;
99
+ }>>): StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
100
+
101
+ /**
102
+ * @typeparam AdditionalProps Additional props to add to your styled component
103
+ */
104
+ <AdditionalProps extends {}>(template: TemplateStringsArray, ...styles: Array<Interpolation<ComponentProps & SpecificComponentProps & AdditionalProps & {
105
+ theme: T;
106
+ }>>): StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
107
+ }
108
+ export interface CreateMUIStyled<MUIStyledCommonProps extends {}, MuiStyledOptions, Theme extends object> {
109
+ <C extends React.ComponentClass<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps> & MuiStyledOptions): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & MUIStyledCommonProps, {}, {
110
+ ref?: React.Ref<InstanceType<C>>;
111
+ }, Theme>;
112
+ <C extends React.ComponentClass<React.ComponentProps<C>>>(component: C, options?: StyledOptions<PropsOf<C> & MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<PropsOf<C> & MUIStyledCommonProps, {}, {
113
+ ref?: React.Ref<InstanceType<C>>;
114
+ }, Theme>;
115
+ <C extends React.JSXElementConstructor<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps> & MuiStyledOptions): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & MUIStyledCommonProps, {}, {}, Theme>;
116
+ <C extends React.JSXElementConstructor<React.ComponentProps<C>>>(component: C, options?: StyledOptions<PropsOf<C> & MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<PropsOf<C> & MUIStyledCommonProps, {}, {}, Theme>;
117
+ <Tag extends keyof React.JSX.IntrinsicElements, ForwardedProps extends keyof React.JSX.IntrinsicElements[Tag] = keyof React.JSX.IntrinsicElements[Tag]>(tag: Tag, options: FilteringStyledOptions<React.JSX.IntrinsicElements[Tag], ForwardedProps> & MuiStyledOptions): CreateStyledComponent<MUIStyledCommonProps, Pick<React.JSX.IntrinsicElements[Tag], ForwardedProps>, {}, Theme>;
118
+ <Tag extends keyof React.JSX.IntrinsicElements>(tag: Tag, options?: StyledOptions<MUIStyledCommonProps> & MuiStyledOptions): CreateStyledComponent<MUIStyledCommonProps, React.JSX.IntrinsicElements[Tag], {}, Theme>;
119
+ }
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine v7.0.0-alpha.1
2
+ * @mui/styled-engine v7.0.0-beta.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine v7.0.0-alpha.1
2
+ * @mui/styled-engine v7.0.0-beta.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine v7.0.0-alpha.1
2
+ * @mui/styled-engine v7.0.0-beta.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/styled-engine",
3
- "version": "7.0.0-alpha.1",
3
+ "version": "7.0.0-beta.0",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "styled() API wrapper package for emotion.",
@@ -26,7 +26,7 @@
26
26
  "url": "https://opencollective.com/mui-org"
27
27
  },
28
28
  "dependencies": {
29
- "@babel/runtime": "^7.26.7",
29
+ "@babel/runtime": "^7.26.9",
30
30
  "@emotion/cache": "^11.13.5",
31
31
  "@emotion/serialize": "^1.3.3",
32
32
  "@emotion/sheet": "^1.4.0",
@@ -83,6 +83,8 @@
83
83
  "types": "./modern/*/index.d.ts",
84
84
  "default": "./modern/*/index.js"
85
85
  }
86
- }
86
+ },
87
+ "./esm": null,
88
+ "./modern": null
87
89
  }
88
90
  }