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

Support @mui/material package naming #423

Merged
merged 3 commits into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
17,917 changes: 17,688 additions & 229 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notistack",
"version": "1.0.6-next.2",
"version": "1.0.6-next.3",
"description": "Highly customizable notification snackbars (toasts) that can be stacked on top of each other",
"main": "dist/index.js",
"module": "dist/notistack.esm.js",
Expand All @@ -24,11 +24,12 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@material-ui/core": "^5.0.0-beta.4"
"@mui/material": "^5.0.0-rc.0",
"@mui/styles": "^5.0.0-rc.0",
Copy link

@hugofpsilva hugofpsilva Sep 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch is no longer dependant on @mui/styles afaik.
You added it here where it was no longer present.

"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"peerDependenciesMeta": {
"@emotion/react": {
Expand All @@ -42,7 +43,8 @@
"@babel/preset-react": "^7.8.3",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@material-ui/core": "^5.0.0-beta.4",
"@mui/material": "^5.0.0-rc.0",
"@mui/styles": "^5.0.0-rc.0",
"@types/node": "^13.9.0",
"@types/react": "^16.9.23",
"@types/react-dom": "^16.9.5",
Expand Down
2 changes: 1 addition & 1 deletion src/SnackbarContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import clsx from 'clsx';
import { styled } from '@material-ui/core/styles';
import { styled } from '@mui/styles';
iamhosseindhv marked this conversation as resolved.
Show resolved Hide resolved
import { SNACKBAR_INDENTS } from './utils/constants';
import { SnackbarProviderProps } from '.';

Expand Down
2 changes: 1 addition & 1 deletion src/SnackbarContent/SnackbarContent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { forwardRef } from 'react';
import clsx from 'clsx';
import { styled } from '@material-ui/core/styles';
import { styled } from '@mui/styles';
iamhosseindhv marked this conversation as resolved.
Show resolved Hide resolved
import { SnackbarContentProps } from '../index';

const componentName = 'SnackbarContent';
Expand Down
2 changes: 1 addition & 1 deletion src/SnackbarItem/Snackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Snackbar/Snackbar.js
*/
import * as React from 'react';
import ClickAwayListener from '@material-ui/core/ClickAwayListener';
import ClickAwayListener from '@mui/material/ClickAwayListener';
import { REASONS } from '../utils/constants';
import useEventCallback from '../utils/useEventCallback';

Expand Down
6 changes: 3 additions & 3 deletions src/SnackbarItem/SnackbarItem.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState, useEffect, useRef } from 'react';
import clsx from 'clsx';
import { emphasize, styled } from '@material-ui/core/styles';
import Collapse from '@material-ui/core/Collapse';
import type { SnackbarClassKey } from '@material-ui/core';
import { emphasize, styled } from '@mui/styles';
import Collapse from '@mui/material/Collapse';
import type { SnackbarClassKey } from '@mui/material';
import SnackbarContent from '../SnackbarContent';
import { getTransitionDirection } from './SnackbarItem.util';
import { REASONS, objectMerge, DEFAULTS, transformer } from '../utils/constants';
Expand Down
8 changes: 4 additions & 4 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Part of the following typing and documentation is from material-ui/src/Snackbar/Snackbar.d.ts
*/
import * as React from 'react';
import { SnackbarClassKey } from '@material-ui/core/Snackbar';
import { ClickAwayListenerProps } from '@material-ui/core/ClickAwayListener';
import { TransitionProps } from '@material-ui/core/transitions/transition';
import { StandardProps } from '@material-ui/core';
import { SnackbarClassKey } from '@mui/material/Snackbar';
import { ClickAwayListenerProps } from '@mui/material/ClickAwayListener';
import { TransitionProps } from '@mui/material/transitions/transition';
import { StandardProps } from '@mui/material';

export type RequiredBy<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>
export type ClassNameMap<ClassKey extends string = string> = Record<ClassKey, string>;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Slide from '@material-ui/core/Slide';
import { SnackbarClassKey } from '@material-ui/core/Snackbar';
import Slide from '@mui/material/Slide';
import { SnackbarClassKey } from '@mui/material/Snackbar';
import { CloseReason, ContainerClassKey, SnackbarProviderProps, VariantType, SnackbarOrigin, VariantClassKey } from '../index';
import { SnackbarItemProps } from '../SnackbarItem';
import { Snack } from '../SnackbarProvider';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/defaultIconVariants.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
import { IconVariant } from '../index';

type Icon = (props: SvgIconProps) => JSX.Element;
Expand Down
22 changes: 11 additions & 11 deletions typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3051,7 +3051,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 19,
"character": 13
}
Expand Down Expand Up @@ -3089,7 +3089,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/styles/index.d.ts",
"fileName": "node_modules/@mui/material/styles/index.d.ts",
"line": 76,
"character": 9
}
Expand Down Expand Up @@ -3177,7 +3177,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 20,
"character": 7
}
Expand Down Expand Up @@ -3210,7 +3210,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 20,
"character": 25
}
Expand All @@ -3232,7 +3232,7 @@
],
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 20,
"character": 19
}
Expand Down Expand Up @@ -3310,7 +3310,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 21,
"character": 9
}
Expand Down Expand Up @@ -3580,7 +3580,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 19,
"character": 13
}
Expand Down Expand Up @@ -3610,7 +3610,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 20,
"character": 7
}
Expand Down Expand Up @@ -3643,7 +3643,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 20,
"character": 25
}
Expand All @@ -3665,7 +3665,7 @@
],
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 20,
"character": 19
}
Expand Down Expand Up @@ -3699,7 +3699,7 @@
},
"sources": [
{
"fileName": "node_modules/@material-ui/core/index.d.ts",
"fileName": "node_modules/@mui/material/index.d.ts",
"line": 21,
"character": 9
}
Expand Down