From c1e3c9b80d3a3371fefc9dded2b3ca2ac526ecc2 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Sep 2025 19:14:42 +0200 Subject: [PATCH] bui-themer: fix mui version 7 -> 5 Signed-off-by: Patrik Oldsberg --- plugins/bui-themer/package.json | 4 ++-- .../convertMuiToBuiTheme.test.ts | 22 ------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/plugins/bui-themer/package.json b/plugins/bui-themer/package.json index 64cad56775..165da9ca0f 100644 --- a/plugins/bui-themer/package.json +++ b/plugins/bui-themer/package.json @@ -34,8 +34,8 @@ "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.61", - "@mui/material": "^7.3.2", - "@mui/system": "^7.3.2", + "@mui/material": "^5.12.2", + "@mui/system": "^5.16.14", "react-use": "^17.2.4" }, "peerDependencies": { diff --git a/plugins/bui-themer/src/components/BuiThemerPage/convertMuiToBuiTheme.test.ts b/plugins/bui-themer/src/components/BuiThemerPage/convertMuiToBuiTheme.test.ts index 60cb2830ce..b686d2622c 100644 --- a/plugins/bui-themer/src/components/BuiThemerPage/convertMuiToBuiTheme.test.ts +++ b/plugins/bui-themer/src/components/BuiThemerPage/convertMuiToBuiTheme.test.ts @@ -215,26 +215,4 @@ describe('convertMuiToBuiTheme', () => { expect(result.css).toContain('--bui-space: calc(4px * 0.5);'); }); - - it('should handle string-based spacing', () => { - const theme = createTheme({ - spacing: '8px', - }); - - const result = convertMuiToBuiTheme(theme); - - expect(result.css).toContain('--bui-space: calc(calc(1 * 8px) * 0.5);'); - }); - - it('should handle string-based border radius', () => { - const theme = createTheme({ - shape: { - borderRadius: '8px', - }, - }); - - const result = convertMuiToBuiTheme(theme); - - expect(result.css).toContain('--bui-radius-3: 8px;'); - }); });