Skip to content

Commit

Permalink
Support @mui/material package naming (#423)
Browse files Browse the repository at this point in the history
* Support Material-UI 5.0.0-rc.0

* Bump version to 1.0.6-next.3

* Remove @mui/styles dependency
  • Loading branch information
ramosbugs authored Sep 11, 2021
1 parent e09bff2 commit 037f741
Show file tree
Hide file tree
Showing 10 changed files with 17,393 additions and 262 deletions.
17,597 changes: 17,364 additions & 233 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 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,11 @@
"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",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"peerDependenciesMeta": {
"@emotion/react": {
Expand All @@ -42,7 +42,7 @@
"@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",
"@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/material/styles';
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/material/styles';
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/material/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

0 comments on commit 037f741

Please sign in to comment.