Skip to content

Commit

Permalink
Update MUI (#3034)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Johannes Obermair <[email protected]>
Co-authored-by: Johannes Obermair <[email protected]>
  • Loading branch information
3 people authored Jan 30, 2025
1 parent 5dd4cbf commit 01a9332
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 215 deletions.
4 changes: 2 additions & 2 deletions demo/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fontsource-variable/roboto-flex": "^5.1.1",
"@mui/material": "^6.3.0",
"@mui/system": "^6.3.0",
"@mui/material": "^6.4.0",
"@mui/system": "^6.4.0",
"@mui/x-data-grid": "^7.23.6",
"@mui/x-data-grid-pro": "^7.23.6",
"change-case": "^5.2.0",
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@emotion/styled": "^11.14.0",
"@fontsource/roboto": "^4.5.8",
"@mdx-js/react": "^3.1.0",
"@mui/material": "^6.3.0",
"@mui/system": "^6.3.0",
"@mui/material": "^6.4.0",
"@mui/system": "^6.4.0",
"@mui/x-data-grid": "^7.23.6",
"draft-js": "^0.11.7",
"final-form": "^4.20.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/admin-color-picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@babel/core": "^7.26.7",
"@comet/admin-babel-preset": "workspace:^7.11.0",
"@comet/eslint-config": "workspace:^7.11.0",
"@mui/material": "^6.3.0",
"@mui/material": "^6.4.0",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@types/tinycolor2": "^1.4.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/admin-date-time/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@comet/admin": "workspace:^7.11.0",
"@comet/admin-icons": "workspace:^7.11.0",
"@mui/utils": "^6.3.0",
"@mui/utils": "^6.4.0",
"date-fns": "^4.1.0",
"react-date-range": "^2.0.1"
},
Expand All @@ -37,7 +37,7 @@
"@babel/core": "^7.26.7",
"@comet/admin-babel-preset": "workspace:^7.11.0",
"@comet/eslint-config": "workspace:^7.11.0",
"@mui/material": "^6.3.0",
"@mui/material": "^6.4.0",
"@types/react": "^18.3.18",
"@types/react-date-range": "^1.4.9",
"@types/react-dom": "^18.3.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/admin-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@babel/core": "^7.26.7",
"@comet/admin-babel-preset": "workspace:^7.11.0",
"@comet/eslint-config": "workspace:^7.11.0",
"@mui/material": "^6.3.0",
"@mui/material": "^6.4.0",
"@types/cli-progress": "^3.11.6",
"@types/node": "^22.10.7",
"@types/react": "^18.3.18",
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/admin-rte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@babel/core": "^7.26.7",
"@comet/admin-babel-preset": "workspace:^7.11.0",
"@comet/eslint-config": "workspace:^7.11.0",
"@mui/material": "^6.3.0",
"@mui/material": "^6.4.0",
"@types/draft-js": "^0.11.18",
"@types/immutable": "^3.8.7",
"@types/jest": "^29.5.14",
Expand Down
6 changes: 3 additions & 3 deletions packages/admin/admin-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
},
"dependencies": {
"@comet/admin-icons": "workspace:^7.11.0",
"@mui/utils": "^6.3.0"
"@mui/utils": "^6.4.0"
},
"devDependencies": {
"@babel/cli": "^7.26.4",
"@babel/core": "^7.26.7",
"@comet/admin-babel-preset": "workspace:^7.11.0",
"@comet/eslint-config": "workspace:^7.11.0",
"@mui/material": "^6.3.0",
"@mui/system": "^6.3.0",
"@mui/material": "^6.4.0",
"@mui/system": "^6.4.0",
"@mui/x-data-grid": "^7.23.6",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
Expand Down
5 changes: 2 additions & 3 deletions packages/admin/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"dependencies": {
"@comet/admin-icons": "workspace:^7.11.0",
"@comet/admin-theme": "workspace:^7.11.0",
"@mui/lab": "^6.0.0-beta.21",
"exceljs": "^4.4.0",
"file-saver": "^2.0.5",
"final-form-set-field-data": "^1.0.2",
Expand All @@ -52,8 +51,8 @@
"@comet/eslint-plugin": "workspace:^7.11.0",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/material": "^6.3.0",
"@mui/system": "^6.3.0",
"@mui/material": "^6.4.0",
"@mui/system": "^6.4.0",
"@mui/x-data-grid": "^7.23.6",
"@mui/x-data-grid-pro": "^7.23.6",
"@testing-library/dom": "^10.4.0",
Expand Down
7 changes: 2 additions & 5 deletions packages/admin/admin/src/common/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
TooltipProps as MuiTooltipProps,
} from "@mui/material";
import { css, useTheme, useThemeProps } from "@mui/material/styles";
import { ComponentProps } from "react";

import { createComponentSlot } from "../helpers/createComponentSlot";

Expand Down Expand Up @@ -184,20 +183,18 @@ export const Tooltip = (inProps: TooltipProps) => {
isRtl: theme.direction === "rtl",
};

const commonTooltipProps: ComponentProps<typeof TooltipRoot> = {
const commonTooltipProps = {
...props,
variant,
disableInteractive,
arrow,
isRtl: ownerState.isRtl,
ownerState,
slots: {
// @ts-expect-error The `ownerState` prop required by `TooltipPopper` does not exist in the type of MUIs `popper` slot in the `Tooltip` component but it is passed to the `TooltipPopper` component correctly.
popper: TooltipPopper,
...props.slots,
},
slotProps: {
popper: {
ownerState,
...props.slotProps?.popper,
},
...props.slotProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ThreeDotSaving } from "@comet/admin-icons";
import { LoadingButton, LoadingButtonProps } from "@mui/lab";
import { ButtonClassKey, ComponentsOverrides } from "@mui/material";
import { Button, ButtonClassKey, ButtonProps, ComponentsOverrides } from "@mui/material";
import { Theme, useThemeProps } from "@mui/material/styles";
import { ReactNode, useEffect, useState } from "react";
import { FormattedMessage } from "react-intl";
Expand All @@ -13,7 +12,7 @@ export type FeedbackButtonClassKey = "idle" | "loading" | "success" | "error" |

type OwnerState = { displayState: FeedbackButtonDisplayState };

const Root = createComponentSlot(LoadingButton)<FeedbackButtonClassKey, OwnerState>({
const Root = createComponentSlot(Button)<FeedbackButtonClassKey, OwnerState>({
componentName: "FeedbackButton",
slotName: "root",
classesResolver(ownerState) {
Expand All @@ -33,10 +32,10 @@ const Tooltip = createComponentSlot(CometTooltip)<FeedbackButtonClassKey>({

export interface FeedbackButtonProps
extends ThemedComponentBaseProps<{
root: typeof LoadingButton;
root: typeof Button;
tooltip: typeof CometTooltip;
}>,
Omit<LoadingButtonProps, "loading"> {
Omit<ButtonProps, "loading"> {
onClick?: () => void | Promise<void>;
hasErrors?: boolean;
loading?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Tooltip } from "../../Tooltip";

export type ToolbarActionButtonClassKey = "root" | "tooltip" | "button" | "iconButton" | "text" | "outlined" | "contained";

type ToolbarActionButtonProps = ButtonProps &
type ToolbarActionButtonProps = Omit<ButtonProps, "loading"> &
ThemedComponentBaseProps<{
tooltip: typeof Tooltip;
iconButton: typeof IconButton;
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/blocks-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"@comet/eslint-config": "workspace:^7.11.0",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/material": "^6.3.0",
"@mui/system": "^6.3.0",
"@mui/material": "^6.4.0",
"@mui/system": "^6.4.0",
"@types/jest": "^29.5.14",
"@types/lodash.isequal": "^4.5.8",
"@types/node": "^22.10.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/cms-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
"@graphql-codegen/near-operation-file-preset": "^2.5.0",
"@graphql-codegen/typescript": "^2.8.8",
"@graphql-codegen/typescript-operations": "^2.5.13",
"@mui/material": "^6.3.0",
"@mui/system": "^6.3.0",
"@mui/material": "^6.4.0",
"@mui/system": "^6.4.0",
"@mui/x-data-grid": "^7.23.6",
"@types/draft-js": "^0.11.18",
"@types/file-saver": "^2.0.7",
Expand Down
Loading

0 comments on commit 01a9332

Please sign in to comment.