From d54279ef84b1603f638496ad7658fad66159eb84 Mon Sep 17 00:00:00 2001 From: Franck LECUYER Date: Thu, 13 Nov 2025 11:30:15 +0100 Subject: [PATCH] Upgrade to MUI v6 Signed-off-by: Franck LECUYER --- package-lock.json | 214 +++++++++--------- package.json | 15 +- src/components/dialogs/commons/grid-item.tsx | 8 +- .../report-viewer/treeview-item.tsx | 2 +- 4 files changed, 120 insertions(+), 119 deletions(-) diff --git a/package-lock.json b/package-lock.json index 396f508493..0919a2fae5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,15 +11,15 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@gridsuite/commons-ui": "0.136.0", + "@gridsuite/commons-ui": "file:../commons-ui/gridsuite-commons-ui-0.136.0.tgz", "@hello-pangea/dnd": "^18.0.1", "@hookform/resolvers": "^4.1.3", - "@mui/icons-material": "^5.18.0", - "@mui/lab": "5.0.0-alpha.175", - "@mui/material": "^5.18.0", + "@mui/icons-material": "^6.5.0", + "@mui/lab": "6.0.1-beta.36", + "@mui/material": "^6.5.0", "@mui/x-charts": "^7.29.1", "@mui/x-tree-view": "^7.29.1", - "@powsybl/network-viewer": "2.0.0", + "@powsybl/network-viewer": "file:../../powsybl/powsybl-network-viewer/powsybl-network-viewer-2.1.0-dev.0.tgz", "@reduxjs/toolkit": "^2.9.0", "@svgdotjs/svg.js": "^3.2.4", "@xyflow/react": "^12.8.4", @@ -31,6 +31,7 @@ "localized-countries": "^2.0.0", "mathjs": "^14.7.0", "mui-nested-menu": "^4.0.1", + "notistack": "^3.0.2", "plotly.js-basic-dist-min": "^2.35.3", "qs": "^6.14.0", "react": "^18.3.1", @@ -3405,8 +3406,8 @@ }, "node_modules/@gridsuite/commons-ui": { "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@gridsuite/commons-ui/-/commons-ui-0.136.0.tgz", - "integrity": "sha512-2/MeU1/FDRiR8DZC8CFqYQmkwZ/zAuAMomCwNWRlobG3hQPOh/xSaKqGPG6G+VZ12//YJAYYWUavXtsRAQTkHg==", + "resolved": "file:../commons-ui/gridsuite-commons-ui-0.136.0.tgz", + "integrity": "sha512-Yrzz1DMniVJBbygmcQ4A1uaj3vNOPMWKSf/59BX+U8wVko9WlRcvLBjIrAb80DSED5M+5G9zsF3QsVAVMv8YJg==", "license": "MPL-2.0", "dependencies": { "@ag-grid-community/locale": "^33.3.2", @@ -3437,9 +3438,9 @@ "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", "@hookform/resolvers": "^4.0.0", - "@mui/icons-material": "^5.16.14", - "@mui/lab": "5.0.0-alpha.175", - "@mui/material": "^5.16.14", + "@mui/icons-material": "^6.5.0", + "@mui/lab": "6.0.1-beta.36", + "@mui/material": "^6.5.0", "@mui/x-tree-view": "^7.29.1", "ag-grid-community": "^33.0.3", "ag-grid-react": "^33.0.4", @@ -4695,22 +4696,22 @@ } }, "node_modules/@mui/base": { - "version": "5.0.0-beta.40-0", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40-0.tgz", - "integrity": "sha512-hG3atoDUxlvEy+0mqdMpWd04wca8HKr2IHjW/fAjlkCHQolSLazhZM46vnHjOf15M4ESu25mV/3PgjczyjVM4w==", + "version": "5.0.0-beta.70", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.70.tgz", + "integrity": "sha512-Tb/BIhJzb0pa5zv/wu7OdokY9ZKEDqcu1BDFnohyvGCoHuSXbEr90rPq1qeNW3XvTBIbNWHEF7gqge+xpUo6tQ==", "deprecated": "This package has been replaced by @base-ui-components/react", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.9", - "@floating-ui/react-dom": "^2.0.8", - "@mui/types": "^7.2.15", - "@mui/utils": "^5.16.12", + "@babel/runtime": "^7.26.0", + "@floating-ui/react-dom": "^2.1.1", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.8", "@popperjs/core": "^2.11.8", - "clsx": "^2.1.0", + "clsx": "^2.1.1", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -4728,9 +4729,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.18.0.tgz", - "integrity": "sha512-jbhwoQ1AY200PSSOrNXmrFCaSDSJWP7qk6urkTmIirvRXDROkqe+QwcLlUiw/PrREwsIF/vm3/dAXvjlMHF0RA==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.5.0.tgz", + "integrity": "sha512-LGb8t8i6M2ZtS3Drn3GbTI1DVhDY6FJ9crEey2lZ0aN2EMZo8IZBZj9wRf4vqbZHaWjsYgtbOnJw5V8UWbmK2Q==", "license": "MIT", "funding": { "type": "opencollective", @@ -4738,22 +4739,22 @@ } }, "node_modules/@mui/icons-material": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.18.0.tgz", - "integrity": "sha512-1s0vEZj5XFXDMmz3Arl/R7IncFqJ+WQ95LDp1roHWGDE2oCO3IS4/hmiOv1/8SD9r6B7tv9GLiqVZYHo+6PkTg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.5.0.tgz", + "integrity": "sha512-VPuPqXqbBPlcVSA0BmnoE4knW4/xG6Thazo8vCLWkOKusko6DtwFV6B665MMWJ9j0KFohTIf3yx2zYtYacvG1g==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.9" + "@babel/runtime": "^7.26.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@mui/material": "^5.0.0", + "@mui/material": "^6.5.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, @@ -4764,21 +4765,21 @@ } }, "node_modules/@mui/lab": { - "version": "5.0.0-alpha.175", - "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.175.tgz", - "integrity": "sha512-AvM0Nvnnj7vHc9+pkkQkoE1i+dEbr6gsMdnSfy7X4w3Ljgcj1yrjZhIt3jGTCLzyKVLa6uve5eLluOcGkvMqUA==", + "version": "6.0.1-beta.36", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-6.0.1-beta.36.tgz", + "integrity": "sha512-af9lDmA9SZGEWF1XXk0EVBpfCITk9IKsvh9lLOZGdYaaHfQeCsqxGEDMvNO66j0P8EYoxpyry84LFCJYuLVtVw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/base": "5.0.0-beta.40-0", - "@mui/system": "^5.16.12", - "@mui/types": "^7.2.15", - "@mui/utils": "^5.16.12", - "clsx": "^2.1.0", + "@babel/runtime": "^7.26.0", + "@mui/base": "5.0.0-beta.70", + "@mui/system": "^6.5.0", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", + "clsx": "^2.1.1", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -4787,7 +4788,8 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@mui/material": ">=5.15.0", + "@mui/material": "^6.5.0", + "@mui/material-pigment-css": "^6.5.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -4799,32 +4801,35 @@ "@emotion/styled": { "optional": true }, + "@mui/material-pigment-css": { + "optional": true + }, "@types/react": { "optional": true } } }, "node_modules/@mui/material": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.18.0.tgz", - "integrity": "sha512-bbH/HaJZpFtXGvWg3TsBWG4eyt3gah3E7nCNU8GLyRjVoWcA91Vm/T+sjHfUcwgJSw9iLtucfHBoq+qW/T30aA==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.5.0.tgz", + "integrity": "sha512-yjvtXoFcrPLGtgKRxFaH6OQPtcLPhkloC0BML6rBG5UeldR0nPULR/2E2BfXdo5JNV7j7lOzrrLX2Qf/iSidow==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/core-downloads-tracker": "^5.18.0", - "@mui/system": "^5.18.0", - "@mui/types": "~7.2.15", - "@mui/utils": "^5.17.1", + "@babel/runtime": "^7.26.0", + "@mui/core-downloads-tracker": "^6.5.0", + "@mui/system": "^6.5.0", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", "@popperjs/core": "^2.11.8", - "@types/react-transition-group": "^4.4.10", - "clsx": "^2.1.0", + "@types/react-transition-group": "^4.4.12", + "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1", "react-is": "^19.0.0", "react-transition-group": "^4.4.5" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -4833,6 +4838,7 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", + "@mui/material-pigment-css": "^6.5.0", "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" @@ -4844,23 +4850,26 @@ "@emotion/styled": { "optional": true }, + "@mui/material-pigment-css": { + "optional": true + }, "@types/react": { "optional": true } } }, "node_modules/@mui/private-theming": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.17.1.tgz", - "integrity": "sha512-XMxU0NTYcKqdsG8LRmSoxERPXwMbp16sIXPcLVgLGII/bVNagX0xaheWAwFv8+zDK7tI3ajllkuD3GZZE++ICQ==", + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.4.9.tgz", + "integrity": "sha512-LktcVmI5X17/Q5SkwjCcdOLBzt1hXuc14jYa7NPShog0GBDCDvKtcnP0V7a2s6EiVRlv7BzbWEJzH6+l/zaCxw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.17.1", + "@babel/runtime": "^7.26.0", + "@mui/utils": "^6.4.9", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -4877,19 +4886,20 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.18.0.tgz", - "integrity": "sha512-BN/vKV/O6uaQh2z5rXV+MBlVrEkwoS/TK75rFQ2mjxA7+NBo8qtTAOA4UaM0XeJfn7kh2wZ+xQw2HAx0u+TiBg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.5.0.tgz", + "integrity": "sha512-8woC2zAqF4qUDSPIBZ8v3sakj+WgweolpyM/FXf8jAx6FMls+IE4Y8VDZc+zS805J7PRz31vz73n2SovKGaYgw==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.9", + "@babel/runtime": "^7.26.0", "@emotion/cache": "^11.13.5", "@emotion/serialize": "^1.3.3", + "@emotion/sheet": "^1.4.0", "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -4910,22 +4920,22 @@ } }, "node_modules/@mui/system": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.18.0.tgz", - "integrity": "sha512-ojZGVcRWqWhu557cdO3pWHloIGJdzVtxs3rk0F9L+x55LsUjcMUVkEhiF7E4TMxZoF9MmIHGGs0ZX3FDLAf0Xw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.5.0.tgz", + "integrity": "sha512-XcbBYxDS+h/lgsoGe78ExXFZXtuIlSBpn/KsZq8PtZcIkUNJInkuDqcLd2rVBQrDC1u+rvVovdaWPf2FHKJf3w==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.17.1", - "@mui/styled-engine": "^5.18.0", - "@mui/types": "~7.2.15", - "@mui/utils": "^5.17.1", - "clsx": "^2.1.0", + "@babel/runtime": "^7.26.0", + "@mui/private-theming": "^6.4.9", + "@mui/styled-engine": "^6.5.0", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", + "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -4964,20 +4974,20 @@ } }, "node_modules/@mui/utils": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.17.1.tgz", - "integrity": "sha512-jEZ8FTqInt2WzxDV8bhImWBqeQRD99c/id/fq83H0ER9tFl+sfZlaAoCdznGvbSQQ9ividMxqSV2c7cC1vBcQg==", + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.4.9.tgz", + "integrity": "sha512-Y12Q9hbK9g+ZY0T3Rxrx9m2m10gaphDuUMgWxyV5kNJevVxXYCLclYUCC9vXaIk1/NdNDTcW2Yfr2OGvNFNmHg==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/types": "~7.2.15", - "@types/prop-types": "^15.7.12", + "@babel/runtime": "^7.26.0", + "@mui/types": "~7.2.24", + "@types/prop-types": "^15.7.14", "clsx": "^2.1.1", "prop-types": "^15.8.1", "react-is": "^19.0.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -5463,9 +5473,9 @@ } }, "node_modules/@powsybl/network-viewer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@powsybl/network-viewer/-/network-viewer-2.0.0.tgz", - "integrity": "sha512-pSCiSs89fQ4fr6/7S2Okv1ELM+xOwBkwpIRGou1ZGFf3j7QQRaWQ0JEeYFGN9cW16cd1bIHTZGz925B4AlwmPg==", + "version": "2.1.0-dev.0", + "resolved": "file:../../powsybl/powsybl-network-viewer/powsybl-network-viewer-2.1.0-dev.0.tgz", + "integrity": "sha512-Hly4nlfkVe6J4qWr2GVXa0T+WWjPAgda4CdbaN5s6/+GzycRrpiSottiyg5YcLyW87g2kAI9lA8yQbVZM/r7EQ==", "hasInstallScript": true, "license": "MPL-2.0", "workspaces": [ @@ -5491,8 +5501,8 @@ }, "peerDependencies": { "@emotion/styled": "^11.14.0", - "@mui/icons-material": "^5.16.14", - "@mui/material": "^5.16.14", + "@mui/icons-material": "^6.5.0", + "@mui/material": "^6.5.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-intl": "^7.1.6" @@ -12152,11 +12162,10 @@ } }, "node_modules/goober": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.16.tgz", - "integrity": "sha512-erjk19y1U33+XAMe1VTvIONHYoSqE4iS7BYUZfHaqeohLmnC0FdxEh7rQU+6MZ4OajItzjZFSRtVANrQwNq6/g==", + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.18.tgz", + "integrity": "sha512-2vFqsaDVIT9Gz7N6kAL++pLpp41l3PfDuusHcjnGLfR6+huZkl6ziX+zgVC3ZxpqWhzH6pyDdGrCeDhMIvwaxw==", "license": "MIT", - "peer": true, "peerDependencies": { "csstype": "^3.0.10" } @@ -15034,7 +15043,6 @@ "resolved": "https://registry.npmjs.org/notistack/-/notistack-3.0.2.tgz", "integrity": "sha512-0R+/arLYbK5Hh7mEfR2adt0tyXJcCC9KkA2hc56FeWik2QN6Bm/S4uW+BjzDARsJth5u06nTjelSw/VSnB1YEA==", "license": "MIT", - "peer": true, "dependencies": { "clsx": "^1.1.0", "goober": "^2.0.33" @@ -15057,7 +15065,6 @@ "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", "license": "MIT", - "peer": true, "engines": { "node": ">=6" } @@ -15656,9 +15663,9 @@ } }, "node_modules/plotly.js": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-3.1.0.tgz", - "integrity": "sha512-vx+CyzApL9tquFpwoPHOGSIWDbFPsA4om/tXZcnsygGUejXideDF9R5VwkltEIDG7Xuof45quVPyz1otv6Aqjw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-3.2.0.tgz", + "integrity": "sha512-VH4FRnWbO35rU3IEPrnZ4pxnjS5NbNz6Jk3Rp06jTIleYdAWCdyRrULSOqQB9UMm9XHRKaIKAZPYBOLqQ1svbA==", "license": "MIT", "peer": true, "dependencies": { @@ -17155,10 +17162,10 @@ "license": "MIT" }, "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "license": "ISC", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", + "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", + "license": "BlueOak-1.0.0", "peer": true }, "node_modules/saxes": { @@ -19797,21 +19804,6 @@ "dev": true, "license": "ISC" }, - "node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - } - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 34b1c5a275..832156a123 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,15 @@ "dependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@gridsuite/commons-ui": "0.136.0", + "@gridsuite/commons-ui": "file:../commons-ui/gridsuite-commons-ui-0.136.0.tgz", "@hello-pangea/dnd": "^18.0.1", "@hookform/resolvers": "^4.1.3", - "@mui/icons-material": "^5.18.0", - "@mui/lab": "5.0.0-alpha.175", - "@mui/material": "^5.18.0", + "@mui/icons-material": "^6.5.0", + "@mui/lab": "6.0.1-beta.36", + "@mui/material": "^6.5.0", "@mui/x-charts": "^7.29.1", "@mui/x-tree-view": "^7.29.1", - "@powsybl/network-viewer": "2.0.0", + "@powsybl/network-viewer": "file:../../powsybl/powsybl-network-viewer/powsybl-network-viewer-2.1.0-dev.0.tgz", "@reduxjs/toolkit": "^2.9.0", "@svgdotjs/svg.js": "^3.2.4", "@xyflow/react": "^12.8.4", @@ -54,8 +54,11 @@ "redux": "^5.0.1", "typeface-roboto": "^1.1.13", "uuid": "^13.0.0", - "yup": "^1.7.0" + "yup": "^1.7.0", + "notistack": "^3.0.2" }, + "//": "For react-is, override to prevent the use of react-is@19 which comes with mui v6 (see migration guide to mui v6)", + "react-is": "^18.3.1", "overrides": { "@powsybl/network-viewer": { "react-intl": "$react-intl" diff --git a/src/components/dialogs/commons/grid-item.tsx b/src/components/dialogs/commons/grid-item.tsx index 4517f987a0..b9413891a3 100644 --- a/src/components/dialogs/commons/grid-item.tsx +++ b/src/components/dialogs/commons/grid-item.tsx @@ -14,8 +14,14 @@ export interface GridItemProps extends PropsWithChildren { } export default function GridItem({ children, size = 6, alignItem = 'flex-start', tooltip }: Readonly) { + let newSize: number | boolean | 'auto' | undefined; + if (typeof size === 'number') { + newSize = size; + } else { + newSize = size === 'grow' ? true : size; + } return ( - + {children && (tooltip ? ( diff --git a/src/components/report-viewer/treeview-item.tsx b/src/components/report-viewer/treeview-item.tsx index c3b6fb3a24..534322be32 100644 --- a/src/components/report-viewer/treeview-item.tsx +++ b/src/components/report-viewer/treeview-item.tsx @@ -50,7 +50,7 @@ const styles = { }), } as const satisfies MuiStyles; -const TreeViewItemBox = styled(Box)(() => { +const TreeViewItemBox = styled('div')(() => { return { display: 'flex', alignItems: 'center',