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

feat/remove deprecated components #349

Merged
merged 27 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cdb17d7
fix: adjust Actions component
KarineBrandelli May 23, 2024
ba02abf
fix: adjust breadcrumbs component
KarineBrandelli May 23, 2024
f059252
fix: adjust card component
KarineBrandelli May 23, 2024
2081de0
fix: adjust visibility icon component
KarineBrandelli May 23, 2024
23909dd
fix: adjust AddButton component
KarineBrandelli May 23, 2024
4fdb1a3
deps: add react-router and react-router-dom deps
KarineBrandelli May 23, 2024
ddbece9
chore: adjust import
KarineBrandelli May 27, 2024
16b64f9
chore: remove wakatime filte
KarineBrandelli May 27, 2024
0863452
chore: adjust DataTable props
KarineBrandelli May 27, 2024
85ad2e8
chore: general adjusts
KarineBrandelli May 27, 2024
0a17832
chore: general adjusts
KarineBrandelli May 27, 2024
f2823e7
feat: remove deprecated components
KarineBrandelli May 27, 2024
2efaefc
docs: update readme and introduction
KarineBrandelli May 27, 2024
5ba43b7
chore: remove material-table dependency and update dependencies
KarineBrandelli May 27, 2024
5021ece
chore: update faker
KarineBrandelli May 27, 2024
3c95609
chore: update react
KarineBrandelli May 27, 2024
055bb7f
chore: move ThemeProvider to theme folder
KarineBrandelli May 27, 2024
80551c9
chore: remove unecessary files
KarineBrandelli May 28, 2024
13119ee
test: adjust tests coverage
KarineBrandelli May 28, 2024
3c4125e
chore: remove unecessary files
KarineBrandelli May 28, 2024
0271ff9
fix: replace Omit by ramda for typescript
KarineBrandelli May 28, 2024
be0e83d
chore: remove unsused dependencies
KarineBrandelli May 28, 2024
7b6dae7
fix: fix eslint warnings
KarineBrandelli May 28, 2024
1256ba7
feat: migrate stories to CSF3 mode
KarineBrandelli May 28, 2024
89fcb34
feat: migrate experimental components to core
KarineBrandelli May 29, 2024
7fea9f5
chore: update dependencies
KarineBrandelli May 29, 2024
ea404e9
docs: update package version
KarineBrandelli May 29, 2024
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
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
dist/*
# FIXME: After project refactor EditableTable should not be ignored
src/core/EditableTable.tsx
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ const rulesReact = {
'react/jsx-key': 'warn',
'react/jsx-pascal-case': 'warn',
'react/self-closing-comp': 'warn',
// it should be 'warn' but
// material-table needs to render nested components
'react/no-unstable-nested-components': 'off',
'react/no-unstable-nested-components': 'warn',
'react/jsx-sort-props': [
'warn',
{
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.12.1
1 change: 0 additions & 1 deletion .tool-versions

This file was deleted.

1 change: 0 additions & 1 deletion .wakatime-project

This file was deleted.

78 changes: 15 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,57 @@
<!-- Logo -->
<p align="center">
<img width="150" src="logo.png" alt="Flipper-UI logo" />
<img width="150" src="./src/images/logo.png" alt="Flipper-UI logo" />
</p>

<!-- Name -->
<h1 align="center">Flipper-UI</h1>

<!-- Badges -->

<div align="center">
React UI based on the <br/>

[React](http://facebook.github.io/react/) UI toolkit for the web.
`@material-ui/core` and `@mui/material` <br/>
toolkit for the web.

[![npm package](https://img.shields.io/npm/v/flipper-ui/latest.svg)](https://www.npmjs.com/package/flipper-ui)
[![npm downloads](https://img.shields.io/npm/dm/flipper-ui.svg)](https://www.npmjs.com/package/flipper-ui)
[![Dependencies](https://img.shields.io/david/nginformatica/flipper-ui.svg?style=flat-square)](https://david-dm.org/nginformatica/flipper-ui)
[![DevDependencies](https://img.shields.io/david/dev/nginformatica/flipper-ui.svg)](https://david-dm.org/nginformatica/flipper-ui?type=dev)
[![Build Status](https://travis-ci.org/nginformatica/flipper-ui.svg?branch=master)](https://travis-ci.org/nginformatica/flipper-ui)

</div>

## Installation

Flipper-UI is available as an [npm package](https://www.npmjs.com/package/flipper-ui).

```sh
// with npm
npm install flipper-ui

// with yarn
```

```sh
yarn add flipper-ui
```

## Usage

Here is a quick example to get you started, **it's all you need**:

```jsx
```tsx
import React from 'react'
import ReactDOM from 'react-dom'
import { render } from 'react-dom'
import { Button } from 'flipper-ui'

function App() {
const App = () => {
return (
<Button variant="contained" color="primary">
Hello World
</Button>
);
)
}

ReactDOM.render(<App />, document.querySelector('#app'));
render(<App />, document.getElementById('root'))
```

## Components

- [x] Advertise
- [x] AppBar/Header
- [x] AutoComplete
- [x] Avatar
- [x] Badge
- [x] Box
- [x] Button
- [x] Checkbox
- [x] Chip
- [x] Collapse
- [x] DatePicker
- [x] Dialog
- [x] Divider
- [x] Expansion Panel
- [x] Menu
- [x] Fade
- [x] Floating Action Button
- [x] Grow
- [x] Icon
- [x] Icon Button
- [x] List
- [x] ListItem
- [x] Paper
- [x] Progress
- [x] Sidebar/Drawer
- [x] Switcher
- [x] Radio
- [x] RadioGroup
- [x] Select
- [x] Slide
- [x] Snackbar
- [x] Table
- [x] Tabs
- [x] TextArea
- [x] TextField
- [x] Tooltip
- [x] Typography
- [x] Zoom

## Next Components

- [ ] Carousel/Gallery
- [ ] Tree

## Documentation

Check out our [documentation website](https://nginformatica.github.io/flipper-ui/).
Check out our [documentation website](https://flipper-ui.ngi.com.br/?path=/docs/introduction--docs). You can also interact with the components there!


## Contributing

Expand Down
7 changes: 2 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ module.exports = {
coveragePathIgnorePatterns: ['stories.(ts|tsx)'],
collectCoverageFrom: [
'<rootDir>/src/core/**/*.(ts|tsx)',
'<rootDir>/src/experimental/**/*.(ts|tsx)',
'!<rootDir>/src/core/data-display/data-table/*.(ts|tsx)',
'!<rootDir>/src/experimental/auto-complete-lab/*.(ts|tsx)',
'!<rootDir>/src/experimental/index.ts',
'!<rootDir>/src/experimental/dialog/index.ts',
'!<rootDir>/src/experimental/fab/index.ts'
'!<rootDir>/src/core/feedback/dialog-v2/index.ts',
'!<rootDir>/src/core/navigation/breadcrumbs/index.tsx'
],
transform: {
'.+\\.(ts|tsx)$': 'ts-jest'
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flipper-ui",
"version": "0.31.7",
"version": "0.32.0",
"description": "",
"main": "dist/index.js",
"homepage": "https://flipper-ui.ngi.com.br/",
Expand Down Expand Up @@ -35,43 +35,40 @@
"dependencies": {
"@date-io/date-fns": "1.3.6",
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.0",
"@emotion/styled": "11.11.5",
"@material-ui/core": "4.12.4",
"@material-ui/lab": "4.0.0-alpha.61",
"@material-ui/pickers": "3.3.11",
"@mui/icons-material": "5.15.17",
"@mui/material": "5.15.17",
"@mui/icons-material": "5.15.19",
"@mui/material": "5.15.19",
"date-fns": "2.30.0",
"faker": "5.5.3",
"material-table": "1.69.3",
"material-ui-chip-input": "2.0.0-beta.2",
"ramda": "0.25.0",
"react-loading-skeleton": "3.4.0",
"react-number-format": "4.4.1",
"sprintf-js": "1.1.3",
"stylis": "4.3.2",
"uuid": "9.0.1"
},
"devDependencies": {
"@babel/cli": "7.24.5",
"@babel/core": "7.24.5",
"@babel/plugin-transform-runtime": "7.24.3",
"@babel/preset-env": "7.24.5",
"@babel/preset-typescript": "7.24.1",
"@babel/cli": "7.24.6",
"@babel/core": "7.24.6",
"@babel/plugin-transform-runtime": "7.24.6",
"@babel/preset-env": "7.24.6",
"@babel/preset-typescript": "7.24.6",
"@faker-js/faker": "8.4.1",
"@storybook/addon-essentials": "7.6.17",
"@storybook/addon-styling-webpack": "0.0.6",
"@storybook/addon-styling-webpack": "1.0.0",
"@storybook/react": "7.6.17",
"@storybook/react-webpack5": "7.6.17",
"@stylistic/eslint-plugin": "1.5.4",
"@testing-library/dom": "10.1.0",
"@testing-library/jest-dom": "6.4.5",
"@testing-library/react": "15.0.7",
"@testing-library/user-event": "14.5.2",
"@types/faker": "5.5.3",
"@types/jest": "29.5.12",
"@types/node": "20.12.11",
"@types/node": "20.12.12",
"@types/ramda": "0.25.36",
"@types/react": "18.2.66",
"@types/react": "18.3.3",
"@types/sprintf-js": "1.1.4",
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "7.2.0",
Expand All @@ -84,26 +81,29 @@
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react": "7.34.2",
"eslint-plugin-react-hooks": "4.6.2",
"fs-extra": "11.2.0",
"identity-obj-proxy": "3.0.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"node-fetch": "3.3.2",
"prettier": "3.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-router": "6.23.1",
"react-router-dom": "6.23.1",
"storybook": "7.6.17",
"styled-components": "6.1.11",
"ts-jest": "29.1.2",
"ts-jest": "29.1.4",
"ts-loader": "9.5.1",
"typescript": "5.4.5",
"webpack": "5.91.0"
},
"peerDependencies": {
"react": ">=17.0.0",
"react-dom": ">=17.0.0",
"react-router": ">=5.0.0",
"react-router-dom": ">=5.0.0",
"styled-components": ">=5.0.0"
},
"publishConfig": {
Expand Down
3 changes: 0 additions & 3 deletions src/core/context/styles-provider/index.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions src/core/context/theme-provider/theme-provider.spec.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Actions should match snapshot 1`] = `
<div>
<div
align="flex-end"
class="sc-dZodDb uKEcO"
class="sc-aYaIB ivIxy"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text"
Expand All @@ -24,7 +24,7 @@ exports[`Actions should match snapshot 1`] = `
/>
</button>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary"
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedSecondary"
data-testid="confirm-action"
name="confirm-action"
style="opacity: 1;"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { render, screen } from '@testing-library/react'
import { Actions } from '.'
import Actions from '.'

describe('Actions', () => {
it('should render', () => {
Expand Down
Loading
Loading