Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MUI #3034

Merged
merged 7 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@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.3.0",
"@fontsource/roboto": "^4.5.8",
"@mdx-js/react": "^1.6.22",
"@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": "^17.0.83",
"@types/react-dom": "^17.0.26",
"@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": "^17.0.83",
"@types/react-date-range": "^1.4.9",
"@types/react-dom": "^17.0.26",
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": "^17.0.83",
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": "^17.0.83",
"@types/react-dom": "^17.0.26",
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 @@ -51,8 +50,8 @@
"@comet/eslint-config": "workspace:^7.11.0",
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.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": "^9.3.4",
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>({
johnnyomair marked this conversation as resolved.
Show resolved Hide resolved
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.5.0",
"@emotion/styled": "^11.3.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
Loading