@mui/utils 9.4.0 → 9.5.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,158 @@
1
1
  # [Versions](https://mui.com/material-ui/getting-started/versions/)
2
2
 
3
+ ## 9.5.0
4
+
5
+ <!-- generated comparing v9.4.0..v9.x -->
6
+
7
+ _Oct 9, 2026_
8
+
9
+ A big thanks to the 28 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - ⚙️ Support [values other than raw options](https://mui.com/material-ui/react-autocomplete/#object-options-with-primitive-values) for Autocomplete via the `getOptionValue` prop.
12
+
13
+ ### `@mui/material@9.5.0`
14
+
15
+ - Add missing override interfaces for `slotProps` (#49345) @sai6855
16
+ - Export private focus-visible utilities (#49139) @siriwatknp
17
+ - Fix `onClose` types for Menu, Snackbar, and SwipeableDrawer (#49351) @Janpot
18
+ - Fix slot handling in Autocomplete chips, TextField `inputLabel`, and NativeSelect `input` (#49354) @Janpot
19
+ - Fix theme `defaultProps` and missing exports (#49342) @Janpot
20
+ - Remove unnecessary `Omit` types (#49338) @sai6855
21
+ - [autocomplete] Lazily derive the initial input value (#49192) @OskarEichler
22
+ - [autocomplete] Prevent crash when changing `groupBy` (#49150) @silviuaavram
23
+ - [autocomplete] Stop filtering once the result limit is reached (#49312) @valkiara
24
+ - [autocomplete] Support values other than raw options (#49313) @silviuaavram
25
+ - [avatargroup] Improve TypeScript performance when using `slotProps` (#49213) (#49215) @sai6855
26
+ - [bottomnavigationaction] Document the `selected` prop (#49190) (#49196) @sai6855
27
+ - [breadcrumbs] Build separators in one pass (#49058) @OskarEichler
28
+ - [button] Fix loading-position style leaking to non-loading buttons (#49182) @siriwatknp
29
+ - [button] Simplify `ExtendButton` type (#49366) @sai6855
30
+ - [buttonbase] Fix LazyRipple retaining event objects when ripples are disabled (#49000) @dizhurnikita
31
+ - [checkbox] Set the native indeterminate state on the input (#49053) @lazerg
32
+ - [dialogcontent] Render the `theme.focusVisible` ring on the scrollable content (#49319) @siriwatknp
33
+ - [inputbase] Fix `slotProps.input` event handlers and ref being ignored (#49341) @Janpot
34
+ - [link] Remove unwanted `Omit` type (#49339) @sai6855
35
+ - [link] Revert to `color-mix` when underline color is not accepted (#49077) @silviuaavram
36
+ - [modal] Prevent `aria-hidden` from being applied to non-portal modals (#49195) @ZeeshanTamboli
37
+ - [select] Fix flaky opening mouseup timing (#49024) @michelengelen
38
+ - [skeleton] Fix the background fallback with CSS theme variables (#49367) @aarongarciah
39
+ - [slider] Fix `disableSwap` when a neighboring thumb is at 0 (#49246) @kwy404
40
+ - [snackbar][speeddial] Remove unnecessary `Omit` in props definitions (#49272) @sai6855
41
+ - [speeddial] Fix horizontal persistent tooltip placement (#49238) @Cunninger
42
+ - [speeddial] Support action slot object refs (#49056) @OskarEichler
43
+ - [table] Improve accessibility for the pagination buttons (#49112) @silviuaavram
44
+ - [tablepaginationactions] Align common types with other components (#49348) @sai6855
45
+ - [tabs] Derive mounted state from the indicator style instead of setting it in an effect (#49326) @ZeeshanTamboli
46
+ - [tabs] Fix selected tab not scrolling into view when scroll buttons appear in auto mode (#48489) @starboyvarun
47
+ - [tabs] Respect `scroll-padding` when scrolling the selected tab into view (#49039) @crispinc-omnea
48
+ - [textfield] Add theme CSS variable for autofill `box-shadow` (#47472) @ludij
49
+ - [theme] Fix `theme.alpha()` for raw colors with CSS variables (#49320) @siriwatknp
50
+ - [theme] Fix theming outliers in Paper, BreadcrumbCollapsed, TablePagination, and Tooltip (#49356) @Janpot
51
+ - [theme] Keep CSS variable fallbacks in `theme.alpha()` (#49368) @aarongarciah
52
+
53
+ ### `@mui/icons-material@9.5.0`
54
+
55
+ - Center the WarningRounded icon within its `viewBox` (#49203) @itd-mb
56
+
57
+ ### `@mui/system@9.5.0`
58
+
59
+ - Remove duplicated `filterProps` mapping in `getThemeValue` (#48640) @sai6855
60
+ - Resolve InitColorSchemeScript `%s` placeholder at build time (#49113) @Janpot
61
+ - Serialize InitColorSchemeScript configuration values (#49091) @Janpot
62
+
63
+ ### `@mui/utils@9.5.0`
64
+
65
+ - Document the deprecated `slotState` parameter and add `resolveComponentProps` tests (#49240) @usamabhatti1998
66
+ - Improve `mergeSlotProps` performance (#48002) @mj12albert
67
+
68
+ ### `@mui/types@9.5.0`
69
+
70
+ - Remove invalid `number` type from supported `OverridableStringUnion` type arguments (#49307) @sai6855
71
+
72
+ ### `@mui/lab@9.0.0-beta.10`
73
+
74
+ - [masonry] Fix styles with CSS theme variables (#49330) @aarongarciah
75
+ - [timelineitem] Keep the spacer selector at one class of specificity (#49028) @Janpot
76
+
77
+ ### `@mui/codemod@9.5.0`
78
+
79
+ - Upgrade required Node.js version in the `engines` field (#49070) @ZeeshanTamboli
80
+ - [formcontrollabel] Stop migrating `ActionsComponent` and remove `inputRef` (#49358) @Janpot
81
+
82
+ ### Docs
83
+
84
+ - Add the accessibility conformance report page (#49267) @michelengelen
85
+ - Add v10 as the next version (#49293) @silviuaavram
86
+ - Allow reopening cookie preferences from a URL hash (#49124) @brijeshb42
87
+ - Clarify how to restore icon `data-testid` attributes in the v7 migration guide (#49109) @alexfauquette
88
+ - Fix @mui/lab version in v7.3.6 changelog (#49145) @mateuseap
89
+ - Fix Next.js font optimization docs to preserve typography letter-spacing (#48488) @starboyvarun
90
+ - Fix the dead Popper.js documentation links (#49081) @lazerg
91
+ - Fix the LLM generated docs paths (#49076) @silviuaavram
92
+ - Improve accessibility for checkbox lists (#49111) @silviuaavram
93
+ - Warn about untrusted values in the `sx` prop (#49212) @Janpot
94
+ - [autocomplete] Add removal and navigation ARIA descriptions to Chip examples (#49086) @silviuaavram
95
+ - [drawer] Add accessible names to close buttons (#49161) @sai6855
96
+ - [material-icons] Add `frame` synonym for the Portrait icon (#49211) @Janpot
97
+ - [material-icons] Improve icon search performance (#49206) @oliviertassinari
98
+ - [numberfield] Document the `format` prop for units and currency (#49160) @Denimworld12
99
+ - [snackbar] Demonstrate Escape handling inside a dialog (#49352) @minwookshin
100
+ - [system] Avoid `any` when spreading the `sx` prop (#49083) @LeusMaximus
101
+
102
+ ### Core
103
+
104
+ - [ci] Add Claude PR review via mui-public reusable workflow (#49037) @Janpot
105
+ - [code-infra] Compare the nightly React runs with the stable Argos build (#49123) @LukasTy
106
+ - [code-infra] Consume shared commands from code-infra orb (#49082) @brijeshb42
107
+ - [code-infra] Convert @mui/lab to TypeScript (#49140) @Janpot
108
+ - [code-infra] Convert @mui/material internal svg-icons to TypeScript (#49143) @Janpot
109
+ - [code-infra] Convert remaining @mui/system .js+.d.ts pairs to TypeScript (part 2) (#48699) @Janpot
110
+ - [code-infra] Fix `package.json` metadata (#49325) @Janpot
111
+ - [code-infra] Include cherry-picks in the changelog (#49377) @brijeshb42
112
+ - [code-infra] Migrate to Babel 8 (#49216) @brijeshb42
113
+ - [code-infra] Pin the Argos baseline to v9.x (#49316) @Janpot
114
+ - [code-infra] Pin the only-allow version in the preinstall hook (#49114) @Janpot
115
+ - [code-infra] Run TypeScript 7 alongside the TS6 JS API (#49075) @brijeshb42
116
+ - [code-infra] Ship documentation Markdown inside the @mui/material package (#49314) @Janpot
117
+ - [code-infra] Show progress and rate limit retry time in `release:changelog` (#49379) @Janpot
118
+ - [code-infra] Update #target-branch-reference for v9.x branch (#49191) @silviuaavram
119
+ - [code-infra] Widen @babel/runtime range and stop emitting empty class fields (#49276) @brijeshb42
120
+ - [core] Remove the leftover canary release script (#49163) @Janpot
121
+ - [core] Replace @mui/internal-waterfall with es-toolkit (#49155) @Janpot
122
+ - [core] Update release publish tags from `next` to `latest` (#49381) @mnajdova
123
+ - [docs-infra] Generate the accessibility Known gaps table (#49355) @michelengelen
124
+ - [docs-infra] Harden the OG image edge function (#49116) @Janpot
125
+ - [docs-infra] Make core-docs agnostic of styled-components (#49138) @Janpot
126
+ - [docs-infra] Migrate deploy-succeeded to event-triggered function (#49158) @brijeshb42
127
+ - [docs-infra] Pin StackBlitz demo vite to v7 and plugin-react to v5 (#49151) @Janpot
128
+ - [docs-infra] Rate-limit the documentation feedback endpoint (#49115) @Janpot
129
+ - [docs-infra] Retire the docs service worker (#49202) @Janpot
130
+ - [docs-infra] Update the deploy script to fetch from the v9.x branch (#49371) @mnajdova
131
+ - [docs-infra] Validate docs feedback content before posting to Slack (#49088) @Janpot
132
+ - [material] Convert colors to TypeScript (#49180) @Janpot
133
+ - [material] Convert utils and six barrels to TypeScript (#49185) @Janpot
134
+ - [test] Add a palette contrast contract for the accessibility reports (#49049) @michelengelen
135
+ - [test] Add a visual regression fixture for the DocSearch modal (#49002) @LukasTy
136
+ - [test] Automate WCAG 2.4.7 Focus Visible checks (#49268) @michelengelen
137
+ - [test] Fix flaky DocSearch modal screenshots (#49122) @LukasTy
138
+ - [test] Fix Vitest imports (#49184) @silviuaavram
139
+ - [test] Load the regression fonts from npm instead of Google Fonts (#49357) @Janpot
140
+ - [test] Run module augmentation tests against built declarations (#49142) @LukasTy
141
+ - [test][accordion] Add axe tests and WCAG conformance reports (#48924) @michelengelen
142
+ - [test][avatar] Add axe tests and WCAG conformance report (#48917) @michelengelen
143
+ - [test][avatar] Move the accessibility fixture to the fixture tree (#49087) @michelengelen
144
+ - [test][button] Add axe test coverage and WCAG conformance report (#48916) @michelengelen
145
+ - [test][checkbox] Add axe tests and WCAG conformance report (#48918) @michelengelen
146
+ - [test][docs-infra] Reduce timing dependencies in the cookie consent test (#49154) @LukasTy
147
+ - [test][linearprogress] Add axe tests and WCAG conformance report (#48922) @michelengelen
148
+ - [test][pagination] Add tests for zero boundary and sibling counts (#49118) @Janpot
149
+ - [test][radio] Add axe tests and WCAG conformance reports (#48920) @michelengelen
150
+ - [test][switch] Add axe tests and WCAG conformance report (#48919) @michelengelen
151
+ - [test][textfield] Add axe tests and WCAG conformance report (#48923) @michelengelen
152
+ - [test][togglebutton] Add axe tests and WCAG conformance reports (#48921) @michelengelen
153
+
154
+ All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @brijeshb42, @crispinc-omnea, @Cunninger, @Denimworld12, @dizhurnikita, @itd-mb, @Janpot, @kwy404, @lazerg, @LeusMaximus, @ludij, @LukasTy, @mateuseap, @michelengelen, @minwookshin, @mj12albert, @mnajdova, @oliviertassinari, @OskarEichler, @sai6855, @silviuaavram, @siriwatknp, @starboyvarun, @usamabhatti1998, @valkiara, @ZeeshanTamboli
155
+
3
156
  ## 9.4.0
4
157
 
5
158
  <!-- generated comparing v9.3.1..master -->
@@ -17,9 +17,11 @@ function extractEventHandlers(object) {
17
17
  return {};
18
18
  }
19
19
  const result = {};
20
- for (const prop of Object.keys(object)) {
21
- if ((0, _isEventHandler.default)(prop, object[prop])) {
22
- result[prop] = object[prop];
20
+ const keys = Object.keys(object);
21
+ for (let i = 0; i < keys.length; i += 1) {
22
+ const key = keys[i];
23
+ if ((0, _isEventHandler.default)(key, object[key])) {
24
+ result[key] = object[key];
23
25
  }
24
26
  }
25
27
  return result;
@@ -10,9 +10,11 @@ function extractEventHandlers(object) {
10
10
  return {};
11
11
  }
12
12
  const result = {};
13
- for (const prop of Object.keys(object)) {
14
- if (isEventHandler(prop, object[prop])) {
15
- result[prop] = object[prop];
13
+ const keys = Object.keys(object);
14
+ for (let i = 0; i < keys.length; i += 1) {
15
+ const key = keys[i];
16
+ if (isEventHandler(key, object[key])) {
17
+ result[key] = object[key];
16
18
  }
17
19
  }
18
20
  return result;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v9.4.0
2
+ * @mui/utils v9.5.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v9.4.0
2
+ * @mui/utils v9.5.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -33,11 +33,6 @@ function mergeSlotProps(parameters) {
33
33
  // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,
34
34
  // so we can simply merge all the props without having to worry about extracting event handlers.
35
35
  const joinedClasses = (0, _clsx.default)(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
36
- const mergedStyle = {
37
- ...additionalProps?.style,
38
- ...externalForwardedProps?.style,
39
- ...externalSlotProps?.style
40
- };
41
36
  const props = {
42
37
  ...additionalProps,
43
38
  ...externalForwardedProps,
@@ -46,8 +41,15 @@ function mergeSlotProps(parameters) {
46
41
  if (joinedClasses.length > 0) {
47
42
  props.className = joinedClasses;
48
43
  }
49
- if (Object.keys(mergedStyle).length > 0) {
50
- props.style = mergedStyle;
44
+ if (additionalProps?.style || externalForwardedProps?.style || externalSlotProps?.style) {
45
+ const mergedStyle = {
46
+ ...additionalProps?.style,
47
+ ...externalForwardedProps?.style,
48
+ ...externalSlotProps?.style
49
+ };
50
+ if (Object.keys(mergedStyle).length > 0) {
51
+ props.style = mergedStyle;
52
+ }
51
53
  }
52
54
  return {
53
55
  props,
@@ -71,12 +73,6 @@ function mergeSlotProps(parameters) {
71
73
  // to properly override style. It requires the most important classes to be last
72
74
  // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.
73
75
  const joinedClasses = (0, _clsx.default)(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
74
- const mergedStyle = {
75
- ...internalSlotProps?.style,
76
- ...additionalProps?.style,
77
- ...externalForwardedProps?.style,
78
- ...externalSlotProps?.style
79
- };
80
76
  const props = {
81
77
  ...internalSlotProps,
82
78
  ...additionalProps,
@@ -86,8 +82,16 @@ function mergeSlotProps(parameters) {
86
82
  if (joinedClasses.length > 0) {
87
83
  props.className = joinedClasses;
88
84
  }
89
- if (Object.keys(mergedStyle).length > 0) {
90
- props.style = mergedStyle;
85
+ if (internalSlotProps?.style || additionalProps?.style || externalForwardedProps?.style || externalSlotProps?.style) {
86
+ const mergedStyle = {
87
+ ...internalSlotProps?.style,
88
+ ...additionalProps?.style,
89
+ ...externalForwardedProps?.style,
90
+ ...externalSlotProps?.style
91
+ };
92
+ if (Object.keys(mergedStyle).length > 0) {
93
+ props.style = mergedStyle;
94
+ }
91
95
  }
92
96
  return {
93
97
  props,
@@ -26,11 +26,6 @@ function mergeSlotProps(parameters) {
26
26
  // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,
27
27
  // so we can simply merge all the props without having to worry about extracting event handlers.
28
28
  const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
29
- const mergedStyle = {
30
- ...additionalProps?.style,
31
- ...externalForwardedProps?.style,
32
- ...externalSlotProps?.style
33
- };
34
29
  const props = {
35
30
  ...additionalProps,
36
31
  ...externalForwardedProps,
@@ -39,8 +34,15 @@ function mergeSlotProps(parameters) {
39
34
  if (joinedClasses.length > 0) {
40
35
  props.className = joinedClasses;
41
36
  }
42
- if (Object.keys(mergedStyle).length > 0) {
43
- props.style = mergedStyle;
37
+ if (additionalProps?.style || externalForwardedProps?.style || externalSlotProps?.style) {
38
+ const mergedStyle = {
39
+ ...additionalProps?.style,
40
+ ...externalForwardedProps?.style,
41
+ ...externalSlotProps?.style
42
+ };
43
+ if (Object.keys(mergedStyle).length > 0) {
44
+ props.style = mergedStyle;
45
+ }
44
46
  }
45
47
  return {
46
48
  props,
@@ -64,12 +66,6 @@ function mergeSlotProps(parameters) {
64
66
  // to properly override style. It requires the most important classes to be last
65
67
  // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.
66
68
  const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);
67
- const mergedStyle = {
68
- ...internalSlotProps?.style,
69
- ...additionalProps?.style,
70
- ...externalForwardedProps?.style,
71
- ...externalSlotProps?.style
72
- };
73
69
  const props = {
74
70
  ...internalSlotProps,
75
71
  ...additionalProps,
@@ -79,8 +75,16 @@ function mergeSlotProps(parameters) {
79
75
  if (joinedClasses.length > 0) {
80
76
  props.className = joinedClasses;
81
77
  }
82
- if (Object.keys(mergedStyle).length > 0) {
83
- props.style = mergedStyle;
78
+ if (internalSlotProps?.style || additionalProps?.style || externalForwardedProps?.style || externalSlotProps?.style) {
79
+ const mergedStyle = {
80
+ ...internalSlotProps?.style,
81
+ ...additionalProps?.style,
82
+ ...externalForwardedProps?.style,
83
+ ...externalSlotProps?.style
84
+ };
85
+ if (Object.keys(mergedStyle).length > 0) {
86
+ props.style = mergedStyle;
87
+ }
84
88
  }
85
89
  return {
86
90
  props,
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = void 0;
8
+ var _isEventHandler = _interopRequireDefault(require("../isEventHandler"));
7
9
  /**
8
10
  * Removes event handlers from the given object.
9
11
  * A field is considered an event handler if it is a function with a name beginning with `on`.
@@ -16,9 +18,13 @@ function omitEventHandlers(object) {
16
18
  return {};
17
19
  }
18
20
  const result = {};
19
- Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {
20
- result[prop] = object[prop];
21
- });
21
+ const keys = Object.keys(object);
22
+ for (let i = 0; i < keys.length; i += 1) {
23
+ const key = keys[i];
24
+ if (!(0, _isEventHandler.default)(key, object[key])) {
25
+ result[key] = object[key];
26
+ }
27
+ }
22
28
  return result;
23
29
  }
24
30
  var _default = exports.default = omitEventHandlers;
@@ -1,3 +1,5 @@
1
+ import isEventHandler from "../isEventHandler/index.mjs";
2
+
1
3
  /**
2
4
  * Removes event handlers from the given object.
3
5
  * A field is considered an event handler if it is a function with a name beginning with `on`.
@@ -10,9 +12,13 @@ function omitEventHandlers(object) {
10
12
  return {};
11
13
  }
12
14
  const result = {};
13
- Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {
14
- result[prop] = object[prop];
15
- });
15
+ const keys = Object.keys(object);
16
+ for (let i = 0; i < keys.length; i += 1) {
17
+ const key = keys[i];
18
+ if (!isEventHandler(key, object[key])) {
19
+ result[key] = object[key];
20
+ }
21
+ }
16
22
  return result;
17
23
  }
18
24
  export default omitEventHandlers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/utils",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Utility functions for React components.",
6
6
  "license": "MIT",
@@ -24,12 +24,12 @@
24
24
  "url": "https://opencollective.com/mui-org"
25
25
  },
26
26
  "dependencies": {
27
- "@babel/runtime": "^7.29.7",
27
+ "@babel/runtime": "^7.29.7 || ^8.0.5",
28
+ "@mui/types": "^9.5.0",
28
29
  "@types/prop-types": "^15.7.15",
29
30
  "clsx": "^2.1.1",
30
31
  "prop-types": "^15.8.1",
31
- "react-is": "^19.2.8",
32
- "@mui/types": "^9.4.0"
32
+ "react-is": "^19.3.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
@@ -2,5 +2,9 @@
2
2
  * If `componentProps` is a function, calls it with the provided `ownerState`.
3
3
  * Otherwise, just returns `componentProps`.
4
4
  */
5
- declare function resolveComponentProps<TProps, TOwnerState, TSlotState>(componentProps: TProps | ((ownerState: TOwnerState, slotState?: TSlotState) => TProps) | undefined, ownerState: TOwnerState, slotState?: TSlotState): TProps | undefined;
5
+ declare function resolveComponentProps<TProps, TOwnerState, TSlotState>(componentProps: TProps | ((ownerState: TOwnerState, slotState?: TSlotState) => TProps) | undefined, ownerState: TOwnerState,
6
+ /**
7
+ * @deprecated Not used internally and will be removed in the next major version.
8
+ */
9
+ slotState?: TSlotState): TProps | undefined;
6
10
  export default resolveComponentProps;
@@ -2,5 +2,9 @@
2
2
  * If `componentProps` is a function, calls it with the provided `ownerState`.
3
3
  * Otherwise, just returns `componentProps`.
4
4
  */
5
- declare function resolveComponentProps<TProps, TOwnerState, TSlotState>(componentProps: TProps | ((ownerState: TOwnerState, slotState?: TSlotState) => TProps) | undefined, ownerState: TOwnerState, slotState?: TSlotState): TProps | undefined;
5
+ declare function resolveComponentProps<TProps, TOwnerState, TSlotState>(componentProps: TProps | ((ownerState: TOwnerState, slotState?: TSlotState) => TProps) | undefined, ownerState: TOwnerState,
6
+ /**
7
+ * @deprecated Not used internally and will be removed in the next major version.
8
+ */
9
+ slotState?: TSlotState): TProps | undefined;
6
10
  export default resolveComponentProps;
@@ -8,7 +8,11 @@ exports.default = void 0;
8
8
  * If `componentProps` is a function, calls it with the provided `ownerState`.
9
9
  * Otherwise, just returns `componentProps`.
10
10
  */
11
- function resolveComponentProps(componentProps, ownerState, slotState) {
11
+ function resolveComponentProps(componentProps, ownerState,
12
+ /**
13
+ * @deprecated Not used internally and will be removed in the next major version.
14
+ */
15
+ slotState) {
12
16
  if (typeof componentProps === 'function') {
13
17
  return componentProps(ownerState, slotState);
14
18
  }
@@ -2,7 +2,11 @@
2
2
  * If `componentProps` is a function, calls it with the provided `ownerState`.
3
3
  * Otherwise, just returns `componentProps`.
4
4
  */
5
- function resolveComponentProps(componentProps, ownerState, slotState) {
5
+ function resolveComponentProps(componentProps, ownerState,
6
+ /**
7
+ * @deprecated Not used internally and will be removed in the next major version.
8
+ */
9
+ slotState) {
6
10
  if (typeof componentProps === 'function') {
7
11
  return componentProps(ownerState, slotState);
8
12
  }
@@ -42,4 +42,4 @@ export interface DataAttributesOverrides {}
42
42
  * index signature themselves, while object literals can pick up the widened
43
43
  * branch and include the augmented keys.
44
44
  */
45
- export type WithDataAttributes<T> = T | (T & DataAttributesOverrides);
45
+ export type WithDataAttributes<T> = T | T & DataAttributesOverrides;
@@ -42,4 +42,4 @@ export interface DataAttributesOverrides {}
42
42
  * index signature themselves, while object literals can pick up the widened
43
43
  * branch and include the augmented keys.
44
44
  */
45
- export type WithDataAttributes<T> = T | (T & DataAttributesOverrides);
45
+ export type WithDataAttributes<T> = T | T & DataAttributesOverrides;