From 8b7dd92d2d9754ab27a9194a3a73d5b852740ecb Mon Sep 17 00:00:00 2001 From: Rom Grk Date: Tue, 14 Jan 2025 10:38:12 -0500 Subject: [PATCH 1/5] Revert "[DataGrid] refactor: theme to CSS variables (#15704)" This reverts commit 85961a5832af9c358b67ed62e918dbbf7817e205. --- .../QuickFilterOutsideOfGrid.js | 11 +- .../QuickFilterOutsideOfGrid.tsx | 11 +- .../migration-data-grid-v7.md | 1 - .../src/components/GridAggregationHeader.tsx | 15 +- .../GridDataSourceGroupingCriteriaCell.tsx | 5 +- .../src/components/GridFooterCell.tsx | 9 +- .../GridGroupingColumnFooterCell.tsx | 4 +- .../components/GridGroupingColumnLeafCell.tsx | 7 +- .../components/GridGroupingCriteriaCell.tsx | 7 +- .../src/components/GridColumnHeaders.tsx | 4 +- .../src/components/GridDetailPanel.tsx | 7 +- .../src/components/GridPagination.tsx | 9 +- .../src/components/GridRowCount.tsx | 7 +- .../src/components/GridSelectedRowCount.tsx | 9 +- .../src/components/cell/GridEditInputCell.tsx | 8 +- .../GridColumnsManagement.tsx | 45 ++-- .../src/components/containers/GridOverlay.tsx | 3 +- .../src/components/containers/GridRoot.tsx | 4 +- .../components/containers/GridRootStyles.ts | 207 ++++++++++++------ .../containers/GridToolbarContainer.tsx | 9 +- .../src/components/menu/GridMenu.tsx | 11 +- .../src/components/panel/GridPanel.tsx | 19 +- .../src/components/panel/GridPanelFooter.tsx | 9 +- .../src/components/panel/GridPanelHeader.tsx | 7 +- .../panel/filterPanel/GridFilterForm.tsx | 9 +- .../toolbar/GridToolbarFilterButton.tsx | 9 +- .../toolbar/GridToolbarQuickFilter.tsx | 13 +- .../GridVirtualScrollerFiller.tsx | 3 +- .../x-data-grid/src/constants/cssVariables.ts | 168 -------------- packages/x-data-grid/src/internals/index.ts | 1 - .../src/utils/css/stylesToString.ts | 78 ------- .../src/utils/css/themeManager.tsx | 64 ------ .../src/utils/css/transformVariables.ts | 92 -------- .../src/utils/css/unitLessProperties.ts | 51 ----- packages/x-data-grid/src/utils/index.ts | 1 - scripts/x-data-grid-premium.exports.json | 1 - scripts/x-data-grid-pro.exports.json | 1 - scripts/x-data-grid.exports.json | 1 - 38 files changed, 248 insertions(+), 672 deletions(-) delete mode 100644 packages/x-data-grid/src/constants/cssVariables.ts delete mode 100644 packages/x-data-grid/src/utils/css/stylesToString.ts delete mode 100644 packages/x-data-grid/src/utils/css/themeManager.tsx delete mode 100644 packages/x-data-grid/src/utils/css/transformVariables.ts delete mode 100644 packages/x-data-grid/src/utils/css/unitLessProperties.ts diff --git a/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.js b/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.js index 7d5ae0bc0b06a..5649acb1c0ea7 100644 --- a/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.js +++ b/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.js @@ -2,21 +2,14 @@ import * as React from 'react'; import Portal from '@mui/material/Portal'; import Box from '@mui/material/Box'; import Grid from '@mui/material/Grid'; -import { - DataGrid, - GridPortalWrapper, - GridToolbarQuickFilter, - GridToolbar, -} from '@mui/x-data-grid'; +import { DataGrid, GridToolbarQuickFilter, GridToolbar } from '@mui/x-data-grid'; import { useDemoData } from '@mui/x-data-grid-generator'; function MyCustomToolbar(props) { return ( document.getElementById('filter-panel')}> - - - + diff --git a/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.tsx b/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.tsx index 45e49efecb35d..71b254306e90c 100644 --- a/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.tsx +++ b/docs/data/data-grid/filtering-recipes/QuickFilterOutsideOfGrid.tsx @@ -2,21 +2,14 @@ import * as React from 'react'; import Portal from '@mui/material/Portal'; import Box from '@mui/material/Box'; import Grid from '@mui/material/Grid'; -import { - DataGrid, - GridPortalWrapper, - GridToolbarQuickFilter, - GridToolbar, -} from '@mui/x-data-grid'; +import { DataGrid, GridToolbarQuickFilter, GridToolbar } from '@mui/x-data-grid'; import { useDemoData } from '@mui/x-data-grid-generator'; function MyCustomToolbar(props: any) { return ( document.getElementById('filter-panel')!}> - - - + diff --git a/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md b/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md index 37ceef86ab6b7..85b8dfa37d6c5 100644 --- a/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md +++ b/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md @@ -98,7 +98,6 @@ Below are described the steps you need to make to migrate from v7 to v8. ### Other exports - `ariaV8` experimental flag is removed. It's now the default behavior. -- Sub-components that are in a React Portal must now be wrapped with `GridPortalWrapper`