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

Atualizado para versão Material ui 5.10.4 #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.

tasks:
- init: yarn install && yarn run build


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This library uses [Unform](https://github.com/Rocketseat/unform) to integrate wi

## Integrations

- [Material UI](packages/material-ui)
- [Material UI](packages/mui)

## Contributing

Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 8 additions & 6 deletions examples/material-ui/package.json → examples/mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
"dev": "webpack-dev-server"
},
"dependencies": {
"@material-ui/core": "^4.11.0",
"@unform/core": "^2.1.3",
"@unform/web": "^2.1.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"@mui/material":"^5.10.4",
"@emotion/react":"^11.10.4",
"@emotion/styled":"^11.10.4",
"@unform/core": "^2.1.6",
"@unform/web": "^2.1.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"styled-components": "^5.1.1",
"unform-material-ui": "file:../../packages/material-ui"
"unform-material-ui": "file:../../packages/mui"
},
"devDependencies": {
"@babel/core": "^7.10.5",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';

import { Button, Grid, CircularProgress, MenuItem } from '@material-ui/core';
import { Button, Grid, CircularProgress, MenuItem } from '@mui/material';
import { FormHandles } from '@unform/core';
import { Form } from '@unform/web';

import { TextField, Select } from '../../../../packages/material-ui/lib';
import { TextField, Select } from '../../../../packages/mui/lib';
import { useRandomPerson } from './useRandomPerson';

const FormWrapper = () => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@commitlint/travis-cli": "^8.3.5",
"@material-ui/core": "^4.10.0",
"@mui/material":"^5.10.4",
"@emotion/react":"^11.10.4",
"@emotion/styled":"^11.10.4",
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@rollup/plugin-url": "^4.0.2",
Expand All @@ -31,8 +33,8 @@
"@types/react-test-renderer": "^16.9.2",
"@typescript-eslint/eslint-plugin": "^3.6.1",
"@typescript-eslint/parser": "^3.6.1",
"@unform/core": "^2.1.0",
"@unform/web": "^2.1.0",
"@unform/core": "^2.1.6",
"@unform/web": "^2.1.6",
"commitlint-config-rocketseat": "^0.0.1",
"coveralls": "^3.0.9",
"eslint": "^6.8.0",
Expand All @@ -53,10 +55,10 @@
"lint-staged": "^10.0.7",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "^3.4.1",
"react-test-renderer": "^16.12.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "^5.0.1",
"react-test-renderer": "^18.2.0",
"rimraf": "^3.0.2",
"rollup": "^1.31.1",
"rollup-plugin-babel": "^4.3.3",
Expand Down
3 changes: 0 additions & 3 deletions packages/material-ui/lib/Checkbox/types.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/material-ui/lib/Switch/types.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/material-ui/lib/TextField/types.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/jest-dom/extend-expect';
import React, { RefObject } from 'react';

import { MenuItem } from '@material-ui/core';
import { MenuItem } from '@mui/material';
import { fireEvent, act, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { FormHandles } from '@unform/core';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useRef, useEffect } from 'react';

import { Checkbox as BaseCheckbox } from '@material-ui/core';
import { Checkbox as BaseCheckbox } from '@mui/material';
import { useField } from '@unform/core';

import { printWarning } from '../debug';
Expand Down
3 changes: 3 additions & 0 deletions packages/mui/lib/Checkbox/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { CheckboxProps as BaseCheckboxProps } from '@mui/material/Checkbox';

export type CheckboxProps = Omit<BaseCheckboxProps, 'name'> & { name: string };
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
FormControl,
InputLabel,
FormHelperText,
} from '@material-ui/core';
} from '@mui/material';
import { useField } from '@unform/core';

import { printWarning } from '../debug';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SelectProps as BaseSelectProps } from '@material-ui/core/Select/Select';
import { SelectProps as BaseSelectProps } from '@mui/material/Select';

export interface SelectOption {
value: string | number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useRef, useEffect } from 'react';

import { Switch as BaseSwitch } from '@material-ui/core';
import { Switch as BaseSwitch } from '@mui/material';
import { useField } from '@unform/core';

import { printWarning } from '../debug';
Expand Down
3 changes: 3 additions & 0 deletions packages/mui/lib/Switch/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { SwitchProps as BaseSwitchProps } from '@mui/material/Switch';

export type SwitchProps = Omit<BaseSwitchProps, 'name'> & { name: string };
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useRef, useEffect, useState } from 'react';

import { TextField as BaseTextField } from '@material-ui/core';
import { TextField as BaseTextField } from '@mui/material';
import { useField } from '@unform/core';

import { printWarning } from '../debug';
Expand Down
5 changes: 5 additions & 0 deletions packages/mui/lib/TextField/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { TextFieldProps as BaseTextFieldProps } from '@mui/material/TextField';

export type TextFieldProps = BaseTextFieldProps & {
name: string;
};
File renamed without changes.
File renamed without changes.
20 changes: 11 additions & 9 deletions packages/material-ui/package.json → packages/mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,24 @@
"repository": {
"type": "git",
"url": "https://github.com/italoiz/unform-community-packages.git",
"directory": "packages/material-ui"
"directory": "packages/mui"
},
"scripts": {
"test": "jest",
"build": "rollup -c ../../rollup.config.js"
},
"peerDependencies": {
"@material-ui/core": "^4.10.0",
"@unform/core": "^2.1.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
"@mui/material":"^5.10.4",
"@emotion/react":"^11.10.4",
"@emotion/styled":"^11.10.4",
"@unform/core": "^2.1.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.11.1",
"@testing-library/react": "^10.4.7",
"@testing-library/user-event": "^10.3.5",
"@unform/web": "^2.1.0"
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@unform/web": "^2.1.6"
}
}
File renamed without changes.
Loading