@mui/x-data-grid 9.0.2 → 9.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +223 -0
  2. package/components/cell/GridCell.d.mts +0 -7
  3. package/components/cell/GridCell.d.ts +0 -7
  4. package/components/cell/GridCell.js +1 -8
  5. package/components/cell/GridCell.mjs +0 -7
  6. package/components/containers/GridRootStyles.js +21 -10
  7. package/components/containers/GridRootStyles.mjs +22 -11
  8. package/components/panel/GridPanelHeader.d.mts +3 -0
  9. package/components/panel/GridPanelHeader.d.ts +3 -0
  10. package/components/panel/GridPanelHeader.js +4 -0
  11. package/components/panel/GridPanelHeader.mjs +4 -0
  12. package/components/virtualization/GridVirtualScroller.js +23 -27
  13. package/components/virtualization/GridVirtualScroller.mjs +24 -28
  14. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.mts +0 -2
  15. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +0 -2
  16. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -2
  17. package/hooks/core/strategyProcessing/useGridStrategyProcessing.mjs +1 -1
  18. package/hooks/core/useGridVirtualizer.d.mts +2 -2
  19. package/hooks/core/useGridVirtualizer.d.ts +2 -2
  20. package/hooks/core/useGridVirtualizer.js +1 -1
  21. package/hooks/core/useGridVirtualizer.mjs +2 -2
  22. package/hooks/features/columns/gridColumnsUtils.d.mts +0 -5
  23. package/hooks/features/columns/gridColumnsUtils.d.ts +0 -5
  24. package/hooks/features/columns/gridColumnsUtils.js +1 -2
  25. package/hooks/features/columns/gridColumnsUtils.mjs +1 -1
  26. package/hooks/features/dimensions/useGridDimensions.js +10 -0
  27. package/hooks/features/dimensions/useGridDimensions.mjs +10 -0
  28. package/hooks/features/rows/gridRowSpanningUtils.d.mts +0 -1
  29. package/hooks/features/rows/gridRowSpanningUtils.d.ts +0 -1
  30. package/hooks/features/rows/gridRowSpanningUtils.js +0 -4
  31. package/hooks/features/rows/gridRowSpanningUtils.mjs +0 -3
  32. package/hooks/features/rows/gridRowsUtils.d.mts +1 -2
  33. package/hooks/features/rows/gridRowsUtils.d.ts +1 -2
  34. package/hooks/features/rows/gridRowsUtils.js +2 -3
  35. package/hooks/features/rows/gridRowsUtils.mjs +1 -2
  36. package/hooks/features/rows/useGridParamsApi.d.mts +0 -1
  37. package/hooks/features/rows/useGridParamsApi.d.ts +0 -1
  38. package/hooks/features/rows/useGridParamsApi.js +0 -2
  39. package/hooks/features/rows/useGridParamsApi.mjs +1 -1
  40. package/hooks/features/rows/useGridRowsOverridableMethods.js +37 -15
  41. package/hooks/features/rows/useGridRowsOverridableMethods.mjs +37 -15
  42. package/hooks/features/virtualization/useGridVirtualization.d.mts +2 -2
  43. package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
  44. package/hooks/utils/useGridSelector.d.mts +0 -1
  45. package/hooks/utils/useGridSelector.d.ts +0 -1
  46. package/hooks/utils/useGridSelector.js +1 -2
  47. package/hooks/utils/useGridSelector.mjs +1 -1
  48. package/index.js +1 -1
  49. package/index.mjs +1 -1
  50. package/package.json +4 -4
  51. package/hooks/core/gridCoreSelector.d.mts +0 -6
  52. package/hooks/core/gridCoreSelector.d.ts +0 -6
  53. package/hooks/core/gridCoreSelector.js +0 -12
  54. package/hooks/core/gridCoreSelector.mjs +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,228 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.0.4
4
+
5
+ _Apr 28, 2026_
6
+
7
+ We'd like to extend a big thank you to the 4 contributors who made this release possible. Here are some highlights ✨:
8
+
9
+ - Fix Pickers previous (v9.0.3) release ensuring the latest `@mui/x-internals` version usage
10
+
11
+ The following team members contributed to this release:
12
+ @alexfauquette, @JCQuintas, @LukasTy, @mj12albert
13
+
14
+ ### Data Grid
15
+
16
+ #### `@mui/x-data-grid@9.0.4`
17
+
18
+ Internal changes.
19
+
20
+ #### `@mui/x-data-grid-pro@9.0.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
21
+
22
+ Same changes as in `@mui/x-data-grid@9.0.4`.
23
+
24
+ #### `@mui/x-data-grid-premium@9.0.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
25
+
26
+ Same changes as in `@mui/x-data-grid-pro@9.0.4`.
27
+
28
+ ### Date and Time Pickers
29
+
30
+ #### `@mui/x-date-pickers@9.0.4`
31
+
32
+ Internal changes.
33
+
34
+ #### `@mui/x-date-pickers-pro@9.0.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
35
+
36
+ Same changes as in `@mui/x-date-pickers@9.0.4`.
37
+
38
+ ### Charts
39
+
40
+ #### `@mui/x-charts@9.0.4`
41
+
42
+ - [charts] Exclude hidden series and items from keyboard navigation (alt approach) (#22221) @JCQuintas
43
+ - [charts] Fix line interaction with `area` and `conectNulls` (#22227) @alexfauquette
44
+ - [charts] Implement the continuous case of `getAxisIndex` for rotation axis (#22230) @alexfauquette
45
+
46
+ #### `@mui/x-charts-pro@9.0.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
47
+
48
+ Same changes as in `@mui/x-charts@9.0.4`.
49
+
50
+ #### `@mui/x-charts-premium@9.0.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
51
+
52
+ Same changes as in `@mui/x-charts-pro@9.0.4` plus:
53
+
54
+ - [charts-premium] Add `showMark` and `shape` properties to radial line (#22226) @alexfauquette
55
+
56
+ ### Tree View
57
+
58
+ #### `@mui/x-tree-view@9.0.4`
59
+
60
+ Internal changes.
61
+
62
+ #### `@mui/x-tree-view-pro@9.0.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
63
+
64
+ Same changes as in `@mui/x-tree-view@9.0.4`.
65
+
66
+ ### Scheduler
67
+
68
+ #### `@mui/x-scheduler@9.0.4`
69
+
70
+ Internal changes.
71
+
72
+ #### `@mui/x-scheduler-premium@9.0.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
73
+
74
+ Same changes as in `@mui/x-scheduler@9.0.4`.
75
+
76
+ ### Codemod
77
+
78
+ #### `@mui/x-codemod@9.0.4`
79
+
80
+ Internal changes.
81
+
82
+ ### Docs
83
+
84
+ - [docs] Update WCAG links (#22234) @mj12albert
85
+
86
+ ### Core
87
+
88
+ - [code-infra] Avoid overriding `renovate` `ignoredPaths` (#22228) @LukasTy
89
+
90
+ ## 9.0.3
91
+
92
+ _Apr 27, 2026_
93
+
94
+ We'd like to extend a big thank you to the 16 contributors who made this release possible. Here are some highlights ✨:
95
+
96
+ - ⌨️ Keyboard support for creating events in the Scheduler
97
+
98
+ Special thanks go out to these community members for their valuable contributions:
99
+ @supunsathsara, @ZAKIURREHMAN
100
+
101
+ The following team members contributed to this release:
102
+ @aemartos, @alexfauquette, @arminmeh, @brijeshb42, @Janpot, @JCQuintas, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @rita-codes, @romgrk, @sai6855, @siriwatknp
103
+
104
+ ### Data Grid
105
+
106
+ #### `@mui/x-data-grid@9.0.3`
107
+
108
+ - [DataGrid] Fix `:first-child` SSR warning when `MuiDataGrid.styleOverrides` is set (#22081) @siriwatknp
109
+ - [DataGrid] Fix row reordering when filter hides rows (#22096) @siriwatknp
110
+ - [DataGrid] Remove unused `LayoutDataGridLegacy` class (#22009) @romgrk
111
+ - [DataGrid] Remove unused code, clean up grid-related utilities and deprecate `GridPanelHeader` (#22112) @sai6855
112
+ - [DataGrid] Fix columns cutting off after resizing (#22088) @ZAKIURREHMAN
113
+
114
+ #### `@mui/x-data-grid-pro@9.0.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
115
+
116
+ Same changes as in `@mui/x-data-grid@9.0.3`.
117
+
118
+ #### `@mui/x-data-grid-premium@9.0.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
119
+
120
+ Same changes as in `@mui/x-data-grid-pro@9.0.3`, plus:
121
+
122
+ - [DataGridPremium] Fix row grouping model updates not being reflected (#22122) @MBilalShafi
123
+
124
+ ### Date and Time Pickers
125
+
126
+ #### `@mui/x-date-pickers@9.0.3`
127
+
128
+ - [pickers] Fix `DateRangeCalendar` drag with `AdapterDayjs` plain-constructor values (#22165) @LukasTy
129
+ - [pickers] Fix disabled state not overriding error border color (#21169) @supunsathsara
130
+ - [pickers] Forward `data-*` and `aria-*` attributes to the root (#22147) @LukasTy
131
+ - [pickers] Support `K` and `k` hour format tokens (#22108) @michelengelen
132
+
133
+ #### `@mui/x-date-pickers-pro@9.0.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
134
+
135
+ Same changes as in `@mui/x-date-pickers@9.0.3`, plus:
136
+
137
+ - [DateRangeCalendar] Ensure date dragging triggers regardless of trigger element (#21868) @michelengelen
138
+
139
+ ### Charts
140
+
141
+ #### `@mui/x-charts@9.0.3`
142
+
143
+ - [charts] Centralize WebGL clear/render cycle (context-based) (#22127) @JCQuintas
144
+ - [charts] Fix closest series detection for line charts (#22168) @alexfauquette
145
+ - [charts] Fix radius grid lines when axis uses point scale (#22134) @alexfauquette
146
+ - [charts] Use cubic solver for berzier intersection (#22152) @alexfauquette
147
+
148
+ #### `@mui/x-charts-pro@9.0.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
149
+
150
+ Same changes as in `@mui/x-charts@9.0.3`, plus:
151
+
152
+ - [charts-pro] Fix wheel zoom clamping with custom `minStart`/`maxEnd` (#22159) @JCQuintas
153
+
154
+ #### `@mui/x-charts-premium@9.0.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
155
+
156
+ Same changes as in `@mui/x-charts-pro@9.0.3`, plus:
157
+
158
+ - [charts] Create a `'radialLine'` series type (#22066) @alexfauquette
159
+ - [charts] Plot radial line (#22133) @alexfauquette
160
+ - [charts] Remove `HeatmapWebGLRenderer` indirection (#22169) @JCQuintas
161
+
162
+ ### Tree View
163
+
164
+ #### `@mui/x-tree-view@9.0.2`
165
+
166
+ Internal changes.
167
+
168
+ #### `@mui/x-tree-view-pro@9.0.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
169
+
170
+ Same changes as in `@mui/x-tree-view@9.0.2`.
171
+
172
+ ### Scheduler
173
+
174
+ #### Breaking changes
175
+
176
+ - The `views` of `EventTimelinePremium` have been renamed to `presets`, with names that describe the header layout. The props `view`/`defaultView`/`views`/`onViewChange` are now `preset`/`defaultPreset`/`presets`/`onPresetChange`, and the type `EventTimelinePremiumView` is now `EventTimelinePremiumPreset`.
177
+
178
+ | Old | New |
179
+ | :------- | :------------- |
180
+ | `time` | `dayAndHour` |
181
+ | `days` | `day` |
182
+ | `weeks` | `dayAndWeek` |
183
+ | `months` | `monthAndYear` |
184
+ | `years` | `year` |
185
+
186
+ CSS variables (`--time-cell-width`, etc.) and headless store state (`state.view`, `setView`) follow the same rename. The `presets` array is now sorted internally against a canonical zoom order.
187
+
188
+ #### `@mui/x-scheduler@9.0.0-alpha.3`
189
+
190
+ - [scheduler] Allow creating events via keyboard - EventCalendar (#21967) @rita-codes
191
+ - [scheduler] Prefix element IDs with a unique Scheduler instance ID (#22109) @rita-codes
192
+
193
+ #### `@mui/x-scheduler-premium@9.0.0-alpha.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
194
+
195
+ Same changes as in `@mui/x-scheduler@9.0.0-alpha.3`.
196
+
197
+ - [scheduler] Allow creating events via keyboard - `EventTimeline` (#22119) @rita-codes
198
+ - [scheduler] Rename `EventTimeline` `views` to ordered presets (#22130) @rita-codes
199
+
200
+ ### Docs
201
+
202
+ - [docs] Cleanup generated llm md files for chat (#22163) @brijeshb42
203
+ - [docs] Fix `highlightScope` description (#22154) @alexfauquette
204
+ - [docs] Remove obsolete v7 deprecation warning for `dayOfWeekFormatter` (#22111) @LukasTy
205
+ - [docs] Use mui.com for broken links checker known targets (#22129) @JCQuintas
206
+ - [docs] Document picker behavior inside MUI `Dialog` and provide recommended solutions (#22144) @michelengelen
207
+ - [docs] Improve v9 license key version mismatch error guidance (#22180) @aemartos
208
+
209
+ ### Core
210
+
211
+ - [code-infra] Reduce concurrency for package build to 5 (#22115) @Janpot
212
+ - [code-infra] Rename `docsx` alias to `docs` (#22155) @brijeshb42
213
+ - [docs-infra] Remove monorepo dependency (#22025) @brijeshb42
214
+ - [docs-infra] Use latest published packages (#22086) @brijeshb42
215
+ - [test] Refactor Pickers tests to async user-event (#22043) @LukasTy
216
+ - [test] Remove redundant explicit `unmount()` calls from Pickers tests (#22118) @LukasTy
217
+
218
+ ### Miscellaneous
219
+
220
+ - [infra] Update `.gitignore` to exclude `.claude/worktrees` (#22145) @michelengelen
221
+ - [infra] Enable branch tracking when creating release branch (#22177) @michelengelen
222
+ - [license] Add MIT license to `x-virtualizer` package (#22164) @michelengelen
223
+ - [website] Fix outdated MUI logos (#22117) @oliviertassinari
224
+ - [internal] Try avoiding store update when virtualization is disabled (#22093) @arminmeh
225
+
3
226
  ## 9.0.2
4
227
 
5
228
  <!-- generated comparing v9.0.1..master -->
@@ -2,14 +2,7 @@ import * as React from 'react';
2
2
  import { type GridRowId } from "../../models/index.mjs";
3
3
  import type { GridAlignment, GridStateColDef } from "../../models/colDef/gridColDef.mjs";
4
4
  import type { GridRowModel, GridTreeNode } from "../../models/gridRows.mjs";
5
- import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.mjs";
6
5
  import { PinnedColumnPosition } from "../../internals/constants.mjs";
7
- export declare const gridPinnedColumnPositionLookup: {
8
- 1: GridPinnedColumnPosition;
9
- 2: GridPinnedColumnPosition;
10
- 0: undefined;
11
- 3: undefined;
12
- };
13
6
  export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
14
7
  align: GridAlignment;
15
8
  className?: string;
@@ -2,14 +2,7 @@ import * as React from 'react';
2
2
  import { type GridRowId } from "../../models/index.js";
3
3
  import type { GridAlignment, GridStateColDef } from "../../models/colDef/gridColDef.js";
4
4
  import type { GridRowModel, GridTreeNode } from "../../models/gridRows.js";
5
- import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.js";
6
5
  import { PinnedColumnPosition } from "../../internals/constants.js";
7
- export declare const gridPinnedColumnPositionLookup: {
8
- 1: GridPinnedColumnPosition;
9
- 2: GridPinnedColumnPosition;
10
- 0: undefined;
11
- 3: undefined;
12
- };
13
6
  export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
14
7
  align: GridAlignment;
15
8
  className?: string;
@@ -6,7 +6,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
6
6
  Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
- exports.gridPinnedColumnPositionLookup = exports.GridCell = void 0;
9
+ exports.GridCell = void 0;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
12
12
  var React = _interopRequireWildcard(require("react"));
@@ -28,7 +28,6 @@ var _models = require("../../models");
28
28
  var _useGridSelector = require("../../hooks/utils/useGridSelector");
29
29
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
30
30
  var _gridFocusStateSelector = require("../../hooks/features/focus/gridFocusStateSelector");
31
- var _gridColumnsInterfaces = require("../../hooks/features/columns/gridColumnsInterfaces");
32
31
  var _constants = require("../../internals/constants");
33
32
  var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
34
33
  var _usePinnedScrollOffset = require("../../hooks/utils/usePinnedScrollOffset");
@@ -38,12 +37,6 @@ var _useGridConfiguration = require("../../hooks/utils/useGridConfiguration");
38
37
  var _jsxRuntime = require("react/jsx-runtime");
39
38
  const _excluded = ["column", "row", "rowId", "rowNode", "align", "children", "colIndex", "width", "className", "style", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "showRightBorder", "showLeftBorder", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
40
39
  _excluded2 = ["changeReason", "unstable_updateValueOnRender"];
41
- const gridPinnedColumnPositionLookup = exports.gridPinnedColumnPositionLookup = {
42
- [_constants.PinnedColumnPosition.LEFT]: _gridColumnsInterfaces.GridPinnedColumnPosition.LEFT,
43
- [_constants.PinnedColumnPosition.RIGHT]: _gridColumnsInterfaces.GridPinnedColumnPosition.RIGHT,
44
- [_constants.PinnedColumnPosition.NONE]: undefined,
45
- [_constants.PinnedColumnPosition.VIRTUAL]: undefined
46
- };
47
40
  const useUtilityClasses = ownerState => {
48
41
  const {
49
42
  align,
@@ -23,7 +23,6 @@ import { GridCellModes } from "../../models/index.mjs";
23
23
  import { useGridSelector } from "../../hooks/utils/useGridSelector.mjs";
24
24
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.mjs";
25
25
  import { gridFocusCellSelector, gridTabIndexCellSelector } from "../../hooks/features/focus/gridFocusStateSelector.mjs";
26
- import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.mjs";
27
26
  import { PinnedColumnPosition } from "../../internals/constants.mjs";
28
27
  import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.mjs";
29
28
  import { usePinnedScrollOffset } from "../../hooks/utils/usePinnedScrollOffset.mjs";
@@ -31,12 +30,6 @@ import { gridEditCellStateSelector } from "../../hooks/features/editing/gridEdit
31
30
  import { attachPinnedStyle } from "../../internals/utils/index.mjs";
32
31
  import { useGridConfiguration } from "../../hooks/utils/useGridConfiguration.mjs";
33
32
  import { jsx as _jsx } from "react/jsx-runtime";
34
- export const gridPinnedColumnPositionLookup = {
35
- [PinnedColumnPosition.LEFT]: GridPinnedColumnPosition.LEFT,
36
- [PinnedColumnPosition.RIGHT]: GridPinnedColumnPosition.RIGHT,
37
- [PinnedColumnPosition.NONE]: undefined,
38
- [PinnedColumnPosition.VIRTUAL]: undefined
39
- };
40
33
  const useUtilityClasses = ownerState => {
41
34
  const {
42
35
  align,
@@ -29,18 +29,22 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
29
29
  // Root overrides
30
30
  const overrides = [styles.root];
31
31
  _gridClasses.gridClassesOverrides.root.forEach(key => {
32
- overrides.push({
33
- [`&.${_gridClasses.gridClasses[key]}`]: styles[key]
34
- });
32
+ if (styles[key] !== undefined) {
33
+ overrides.push({
34
+ [`&.${_gridClasses.gridClasses[key]}`]: styles[key]
35
+ });
36
+ }
35
37
  });
36
38
 
37
39
  // Child element overrides
38
40
  // - Only declare overrides here for class names that are not applied to `styled` components.
39
41
  // - For `styled` components, declare overrides in the component itself.
40
42
  _gridClasses.gridClassesOverrides.children.forEach(key => {
41
- overrides.push({
42
- [`& .${_gridClasses.gridClasses[key]}`]: styles[key]
43
- });
43
+ if (styles[key] !== undefined) {
44
+ overrides.push({
45
+ [`& .${_gridClasses.gridClasses[key]}`]: styles[key]
46
+ });
47
+ }
44
48
  });
45
49
  return overrides;
46
50
  }
@@ -132,10 +136,17 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
132
136
  transform: 'translate(0, 0)',
133
137
  // Create a stacking context to keep scrollbars from showing on top
134
138
 
135
- [`.${_gridClasses.gridClasses.main} > *:first-child${ignoreSsrWarning}`]: {
136
- borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
137
- borderTopRightRadius: 'var(--unstable_DataGrid-radius)'
138
- },
139
+ // Use `css` tagged template so the ignore-comment remains a sibling of the
140
+ // `:first-child` rule in the stylis AST. Previously, the comment was embedded
141
+ // in the object-key selector, which got separated from the rule during
142
+ // pre-serialization when `styleOverrides` were applied, re-triggering Emotion's
143
+ // unsafe-selector SSR warning. https://github.com/emotion-js/emotion/issues/1105
144
+ [`.${_gridClasses.gridClasses.main}`]: (0, _styles.css)`
145
+ & > *:first-child ${ignoreSsrWarning} {
146
+ border-top-left-radius: var(--unstable_DataGrid-radius);
147
+ border-top-right-radius: var(--unstable_DataGrid-radius);
148
+ }
149
+ `,
139
150
  [`&.${_gridClasses.gridClasses.autoHeight}`]: {
140
151
  height: 'auto'
141
152
  },
@@ -1,4 +1,4 @@
1
- import { styled } from '@mui/material/styles';
1
+ import { styled, css } from '@mui/material/styles';
2
2
  import { gridClasses as c, gridClassesOverrides } from "../../constants/gridClasses.mjs";
3
3
  import { vars } from "../../constants/cssVariables.mjs";
4
4
  import { useGridSelector } from "../../hooks/utils/useGridSelector.mjs";
@@ -23,18 +23,22 @@ export const GridRootStyles = styled('div', {
23
23
  // Root overrides
24
24
  const overrides = [styles.root];
25
25
  gridClassesOverrides.root.forEach(key => {
26
- overrides.push({
27
- [`&.${c[key]}`]: styles[key]
28
- });
26
+ if (styles[key] !== undefined) {
27
+ overrides.push({
28
+ [`&.${c[key]}`]: styles[key]
29
+ });
30
+ }
29
31
  });
30
32
 
31
33
  // Child element overrides
32
34
  // - Only declare overrides here for class names that are not applied to `styled` components.
33
35
  // - For `styled` components, declare overrides in the component itself.
34
36
  gridClassesOverrides.children.forEach(key => {
35
- overrides.push({
36
- [`& .${c[key]}`]: styles[key]
37
- });
37
+ if (styles[key] !== undefined) {
38
+ overrides.push({
39
+ [`& .${c[key]}`]: styles[key]
40
+ });
41
+ }
38
42
  });
39
43
  return overrides;
40
44
  }
@@ -126,10 +130,17 @@ export const GridRootStyles = styled('div', {
126
130
  transform: 'translate(0, 0)',
127
131
  // Create a stacking context to keep scrollbars from showing on top
128
132
 
129
- [`.${c.main} > *:first-child${ignoreSsrWarning}`]: {
130
- borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
131
- borderTopRightRadius: 'var(--unstable_DataGrid-radius)'
132
- },
133
+ // Use `css` tagged template so the ignore-comment remains a sibling of the
134
+ // `:first-child` rule in the stylis AST. Previously, the comment was embedded
135
+ // in the object-key selector, which got separated from the rule during
136
+ // pre-serialization when `styleOverrides` were applied, re-triggering Emotion's
137
+ // unsafe-selector SSR warning. https://github.com/emotion-js/emotion/issues/1105
138
+ [`.${c.main}`]: css`
139
+ & > *:first-child ${ignoreSsrWarning} {
140
+ border-top-left-radius: var(--unstable_DataGrid-radius);
141
+ border-top-right-radius: var(--unstable_DataGrid-radius);
142
+ }
143
+ `,
133
144
  [`&.${c.autoHeight}`]: {
134
145
  height: 'auto'
135
146
  },
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { type SxProps, type Theme } from '@mui/system';
3
+ /**
4
+ * @deprecated This component is not used internally and will be removed in a future major release.
5
+ */
3
6
  declare function GridPanelHeader(props: React.HTMLAttributes<HTMLDivElement> & {
4
7
  sx?: SxProps<Theme>;
5
8
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { type SxProps, type Theme } from '@mui/system';
3
+ /**
4
+ * @deprecated This component is not used internally and will be removed in a future major release.
5
+ */
3
6
  declare function GridPanelHeader(props: React.HTMLAttributes<HTMLDivElement> & {
4
7
  sx?: SxProps<Theme>;
5
8
  }): import("react/jsx-runtime").JSX.Element;
@@ -33,6 +33,10 @@ const GridPanelHeaderRoot = (0, _system.styled)('div', {
33
33
  })({
34
34
  padding: _cssVariables.vars.spacing(1)
35
35
  });
36
+
37
+ /**
38
+ * @deprecated This component is not used internally and will be removed in a future major release.
39
+ */
36
40
  function GridPanelHeader(props) {
37
41
  const {
38
42
  className
@@ -25,6 +25,10 @@ const GridPanelHeaderRoot = styled('div', {
25
25
  })({
26
26
  padding: vars.spacing(1)
27
27
  });
28
+
29
+ /**
30
+ * @deprecated This component is not used internally and will be removed in a future major release.
31
+ */
28
32
  function GridPanelHeader(props) {
29
33
  const {
30
34
  className
@@ -113,39 +113,35 @@ function GridVirtualScroller(props) {
113
113
  const virtualizer = (0, _useGridVirtualizer.useGridVirtualizer)();
114
114
  const layoutMode = virtualizer.store.use(_xVirtualizer.Virtualization.selectors.layoutMode);
115
115
  const hasContentFiller = layoutMode === 'uncontrolled' && loadingOverlayVariant !== 'skeleton';
116
- const {
117
- getContainerProps,
118
- getScrollerProps,
119
- getScrollerContentProps,
120
- getViewportProps,
121
- getContentProps,
122
- getPositionerProps,
123
- getScrollbarVerticalProps,
124
- getScrollbarHorizontalProps,
125
- getRows,
126
- getScrollAreaProps,
127
- getContainerVerticalProps
128
- } = virtualizer.api.getters;
129
- const rows = getRows(undefined, (0, _rows.gridRowTreeSelector)(apiRef));
130
- const containerVerticalProps = getContainerVerticalProps();
116
+ const containerProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.containerProps);
117
+ const scrollerProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.scrollerProps);
118
+ const scrollerContentProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.scrollerContentProps);
119
+ const viewportProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.viewportProps);
120
+ const contentProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.contentProps);
121
+ const positionerProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.positionerProps);
122
+ const scrollbarVerticalProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.scrollbarVerticalProps);
123
+ const scrollbarHorizontalProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.scrollbarHorizontalProps);
124
+ const scrollAreaProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.scrollAreaProps);
125
+ const containerVerticalProps = virtualizer.store.use(_xVirtualizer.LayoutDataGrid.selectors.containerVerticalProps);
126
+ const rows = virtualizer.api.getters.getRows(undefined, (0, _rows.gridRowTreeSelector)(apiRef));
131
127
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridMainContainer.GridMainContainer, (0, _extends2.default)({
132
128
  className: (0, _clsx.default)(classes.root, layoutMode === 'controlled' && _gridClasses.gridClasses['virtualizer--layoutControlled'])
133
- }, getContainerProps(), {
129
+ }, containerProps, {
134
130
  ownerState: ownerState,
135
131
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GridScrollArea.GridScrollArea, (0, _extends2.default)({
136
132
  scrollDirection: "left"
137
- }, getScrollAreaProps())), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridScrollArea.GridScrollArea, (0, _extends2.default)({
133
+ }, scrollAreaProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridScrollArea.GridScrollArea, (0, _extends2.default)({
138
134
  scrollDirection: "right"
139
- }, getScrollAreaProps())), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridScrollArea.GridScrollArea, (0, _extends2.default)({
135
+ }, scrollAreaProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridScrollArea.GridScrollArea, (0, _extends2.default)({
140
136
  scrollDirection: "up"
141
- }, getScrollAreaProps())), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridScrollArea.GridScrollArea, (0, _extends2.default)({
137
+ }, scrollAreaProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridScrollArea.GridScrollArea, (0, _extends2.default)({
142
138
  scrollDirection: "down"
143
- }, getScrollAreaProps())), /*#__PURE__*/(0, _jsxRuntime.jsx)(Scroller, (0, _extends2.default)({
139
+ }, scrollAreaProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(Scroller, (0, _extends2.default)({
144
140
  className: classes.scroller
145
- }, getScrollerProps(), {
141
+ }, scrollerProps, {
146
142
  ownerState: ownerState,
147
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollerContent.GridVirtualScrollerContent, (0, _extends2.default)({}, getScrollerContentProps(), {
148
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Viewport, (0, _extends2.default)({}, getViewportProps(), {
143
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollerContent.GridVirtualScrollerContent, (0, _extends2.default)({}, scrollerContentProps, {
144
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Viewport, (0, _extends2.default)({}, viewportProps, {
149
145
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridTopContainer.GridTopContainer, (0, _extends2.default)({}, containerVerticalProps, {
150
146
  children: [!rootProps.listView && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaders.GridHeaders, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.pinnedRows, {
151
147
  position: "top"
@@ -156,11 +152,11 @@ function GridVirtualScroller(props) {
156
152
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Overlay, (0, _extends2.default)({}, rootProps.slotProps?.[overlayType]))
157
153
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridVirtualScrollerRenderZone.GridVirtualScrollerRenderZone, (0, _extends2.default)({
158
154
  role: "rowgroup"
159
- }, getPositionerProps(), {
155
+ }, positionerProps, {
160
156
  children: [rows, /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.detailPanels, {})]
161
157
  })), hasContentFiller && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _extends2.default)({
162
158
  className: _gridClasses.gridClasses.contentFiller
163
- }, getContentProps())), hasBottomFiller && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollerFiller.GridVirtualScrollerFiller, {
159
+ }, contentProps)), hasBottomFiller && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollerFiller.GridVirtualScrollerFiller, {
164
160
  rowsLength: rows.length
165
161
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.bottomContainer, (0, _extends2.default)({}, containerVerticalProps, {
166
162
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.pinnedRows, {
@@ -174,13 +170,13 @@ function GridVirtualScroller(props) {
174
170
  position: "horizontal"
175
171
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollbar.GridVirtualScrollbar, (0, _extends2.default)({
176
172
  position: "horizontal"
177
- }, getScrollbarHorizontalProps()))]
173
+ }, scrollbarHorizontalProps))]
178
174
  }), hasScrollY && /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
179
175
  children: [rootProps.pinnedRowsSectionSeparator?.endsWith('shadow') && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridScrollShadows.GridScrollShadows, {
180
176
  position: "vertical"
181
177
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollbar.GridVirtualScrollbar, (0, _extends2.default)({
182
178
  position: "vertical"
183
- }, getScrollbarVerticalProps()))]
179
+ }, scrollbarVerticalProps))]
184
180
  }), hasScrollX && hasScrollY && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridVirtualScrollbar.ScrollbarCorner, {
185
181
  "aria-hidden": "true"
186
182
  }), props.children]