@mui/styled-engine-sc 6.0.0-alpha.8 → 6.0.0-alpha.9

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,47 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.15.1
4
+
5
+ <!-- generated comparing v5.15.0..master -->
6
+
7
+ _Dec 19, 2023_
8
+
9
+ A big thanks to the 15 contributors who made this release possible.
10
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
11
+
12
+ ### `@mui/material@5.15.1`
13
+
14
+ - &#8203;<!-- 13 -->[CardActions][DialogActions] Apply margin for all children except for 1st child (#40168) @sai6855
15
+ - &#8203;<!-- 03 -->[TablePagination] Add ability to change icons in TablePaginationActions using `slots` and `slotProps` (#33797) @pratikkarad
16
+ - &#8203;<!-- 13 -->[CssVarsProvider] Fix HSL breaking button styles (#39869) @gitstart
17
+
18
+ ### `@mui/joy@5.0.0-beta.19`
19
+
20
+ - &#8203;<!-- 05 -->[FormControl] Fix issue with the conditional setting of `htmlFor` and `id` attributes not functioning properly for form labels (#40180) @ReaZzy
21
+ - &#8203;<!-- 04 -->[typescript] Address TypeScript issue with custom zIndex not functioning (#40133) @qiweiii
22
+
23
+ ### `@mui/styled-engine-sc@6.0.0-alpha.9`
24
+
25
+ - &#8203;<!-- 02 -->[typescript] Fix `theme` being of type any (#40200) @mnajdova
26
+
27
+ ### Docs
28
+
29
+ - &#8203;<!-- 09 -->[joy-ui] Fix typo in the CSS baseline page (#40222) @possibilities
30
+ - &#8203;<!-- 08 -->[joy-ui] Document missing Autocomplete props (#39979) @ZeeshanTamboli
31
+ - &#8203;<!-- 10 -->[joy-ui] Fix typo about Typography levels (#40230) @zanivan
32
+ - &#8203;<!-- 07 -->[material-ui] Update the related projects page to list `mui-tiptap` for rich text (#40216) @sjdemartini
33
+ - &#8203;<!-- 06 -->[material-ui] Fix typo in the Next.js integration page (#40209) @s8990
34
+
35
+ ### Core
36
+
37
+ - &#8203;<!-- 14 -->[blog] Fix access to Notion without an account @oliviertassinari
38
+ - &#8203;<!-- 12 -->[core] Update workflows and issue templates to reflect the updated label (#40197) @MBilalShafi
39
+ - &#8203;<!-- 11 -->[docs] Replace Twitter with X (#40193) @mbrookes
40
+ - &#8203;<!-- 10 -->[docs-infra] Uplift the Algolia search modal design (#40186) @danilo-leal
41
+ - &#8203;<!-- 01 -->[website] Update product descriptions and social preview images (#32181) @danilo-leal
42
+
43
+ All contributors of this release in alphabetical order: @danilo-leal, @gitstart, @MBilalShafi, @mbrookes, @mnajdova, @oliviertassinari, @possibilities, @pratikkarad, @qiweiii, @ReaZzy, @s8990, @sai6855, @sjdemartini, @zanivan, @ZeeshanTamboli
44
+
3
45
  ## 5.15.0
4
46
 
5
47
  <!-- generated comparing v5.14.20..master -->
package/index.d.ts CHANGED
@@ -292,32 +292,85 @@ export interface StyledConfig<O extends object = {}> {
292
292
  // TODO: Add all types from the original StyledComponentWrapperProperties
293
293
  componentId?: string;
294
294
  displayName?: string;
295
+ label?: string;
296
+ target?: string;
295
297
  shouldForwardProp?:
296
298
  | ((prop: keyof O, defaultValidatorFn: (prop: keyof O) => boolean) => boolean)
297
299
  | undefined;
298
300
  }
299
301
 
302
+ /** Same as StyledConfig but shouldForwardProp must be a type guard */
303
+ export interface FilteringStyledOptions<Props, ForwardedProps extends keyof Props = keyof Props> {
304
+ componentId?: string;
305
+ displayName?: string;
306
+ label?: string;
307
+ shouldForwardProp?(propName: PropertyKey): propName is ForwardedProps;
308
+ target?: string;
309
+ }
310
+
300
311
  // same as ThemedBaseStyledInterface in styled-components, but with added options & common props for MUI components
301
312
  export interface ThemedBaseStyledInterface<
302
313
  MUIStyledCommonProps extends object,
303
314
  MuiStyledOptions extends object,
304
- T extends object,
305
- > extends ThemedStyledComponentFactories<T> {
306
- <C extends AnyStyledComponent>(
315
+ Theme extends object,
316
+ > extends ThemedStyledComponentFactories<Theme> {
317
+ <
318
+ C extends React.ComponentClass<React.ComponentProps<C>>,
319
+ ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>,
320
+ >(
307
321
  component: C,
308
- options?: StyledConfig<any> & MuiStyledOptions,
309
- ): ThemedStyledFunction<
310
- StyledComponentInnerComponent<C>,
311
- T,
312
- StyledComponentInnerOtherProps<C> & MUIStyledCommonProps,
313
- StyledComponentInnerAttrs<C>
322
+ options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps> & MuiStyledOptions,
323
+ ): CreateStyledComponent<
324
+ Pick<PropsOf<C>, ForwardedProps> & MUIStyledCommonProps,
325
+ {},
326
+ {
327
+ ref?: React.Ref<InstanceType<C>>;
328
+ },
329
+ Theme
314
330
  >;
315
- <C extends keyof JSX.IntrinsicElements | React.ComponentType<any>>(
316
- // unfortunately using a conditional type to validate that it can receive a `theme?: Theme`
317
- // causes tests to fail in TS 3.1
331
+
332
+ <C extends React.ComponentClass<React.ComponentProps<C>>>(
318
333
  component: C,
319
- options?: StyledConfig<any> & MuiStyledOptions,
320
- ): ThemedStyledFunction<C, T, MUIStyledCommonProps>;
334
+ options?: StyledConfig<PropsOf<C> & MUIStyledCommonProps> & MuiStyledOptions,
335
+ ): CreateStyledComponent<
336
+ PropsOf<C> & MUIStyledCommonProps,
337
+ {},
338
+ {
339
+ ref?: React.Ref<InstanceType<C>>;
340
+ },
341
+ Theme
342
+ >;
343
+
344
+ <
345
+ C extends React.JSXElementConstructor<React.ComponentProps<C>>,
346
+ ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>,
347
+ >(
348
+ component: C,
349
+ options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps> & MuiStyledOptions,
350
+ ): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & MUIStyledCommonProps, {}, {}, Theme>;
351
+
352
+ <C extends React.JSXElementConstructor<React.ComponentProps<C>>>(
353
+ component: C,
354
+ options?: StyledConfig<PropsOf<C> & MUIStyledCommonProps> & MuiStyledOptions,
355
+ ): CreateStyledComponent<PropsOf<C> & MUIStyledCommonProps, {}, {}, Theme>;
356
+
357
+ <
358
+ Tag extends keyof JSX.IntrinsicElements,
359
+ ForwardedProps extends keyof JSX.IntrinsicElements[Tag] = keyof JSX.IntrinsicElements[Tag],
360
+ >(
361
+ tag: Tag,
362
+ options: FilteringStyledOptions<JSX.IntrinsicElements[Tag], ForwardedProps> & MuiStyledOptions,
363
+ ): CreateStyledComponent<
364
+ MUIStyledCommonProps,
365
+ Pick<JSX.IntrinsicElements[Tag], ForwardedProps>,
366
+ {},
367
+ Theme
368
+ >;
369
+
370
+ <Tag extends keyof JSX.IntrinsicElements>(
371
+ tag: Tag,
372
+ options?: StyledConfig<MUIStyledCommonProps> & MuiStyledOptions,
373
+ ): CreateStyledComponent<MUIStyledCommonProps, JSX.IntrinsicElements[Tag], {}, Theme>;
321
374
  }
322
375
 
323
376
  export type CreateMUIStyled<
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine-sc v6.0.0-alpha.8
2
+ * @mui/styled-engine-sc v6.0.0-alpha.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine-sc v6.0.0-alpha.8
2
+ * @mui/styled-engine-sc v6.0.0-alpha.9
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-sc v6.0.0-alpha.8
2
+ * @mui/styled-engine-sc v6.0.0-alpha.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine-sc v6.0.0-alpha.8
2
+ * @mui/styled-engine-sc v6.0.0-alpha.9
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-sc",
3
- "version": "6.0.0-alpha.8",
3
+ "version": "6.0.0-alpha.9",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "styled() API wrapper package for styled-components.",