Skip to content

Commit 812b074

Browse files
Merge pull request #359 from nginformatica/feat/design-system-colors
Feat/design system colors
2 parents 4ee3238 + 911f8a4 commit 812b074

File tree

28 files changed

+1736
-2583
lines changed

28 files changed

+1736
-2583
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const config: StorybookConfig = {
1010
features: {
1111
storyStoreV7: false
1212
},
13-
addons: ['@storybook/addon-essentials', '@storybook/addon-styling-webpack'],
13+
addons: ['@storybook/addon-essentials'],
1414
docs: {
1515
autodocs: true
1616
},

package.json

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flipper-ui",
3-
"version": "0.34.6",
3+
"version": "0.34.7",
44
"description": "React UI based on the @mui/material toolkit for the web",
55
"main": "dist/index.js",
66
"author": "NG",
@@ -10,9 +10,6 @@
1010
"type": "git",
1111
"url": "https://github.com/nginformatica/flipper-ui.git"
1212
},
13-
"resolutions": {
14-
"wrap-ansi": "7.0.0"
15-
},
1613
"scripts": {
1714
"start": "storybook dev -p 6006",
1815
"build": "yarn clean && yarn build:ts && yarn build:babel",
@@ -35,50 +32,50 @@
3532
"dependencies": {
3633
"@emotion/react": "11.13.3",
3734
"@emotion/styled": "11.13.0",
38-
"@mui/icons-material": "6.0.2",
39-
"@mui/material": "6.0.2",
40-
"@mui/styles": "6.0.2",
41-
"@mui/x-date-pickers": "7.15.0",
35+
"@mui/icons-material": "6.1.2",
36+
"@mui/material": "6.1.2",
37+
"@mui/styles": "6.1.2",
38+
"@mui/system": "6.1.2",
39+
"@mui/x-date-pickers": "7.18.0",
4240
"date-fns": "2.30.0",
4341
"ramda": "0.30.1",
44-
"react-loading-skeleton": "3.4.0",
45-
"react-number-format": "5.4.1",
42+
"react-loading-skeleton": "3.5.0",
43+
"react-number-format": "5.4.2",
4644
"sprintf-js": "1.1.3",
4745
"uuid": "10.0.0"
4846
},
4947
"devDependencies": {
50-
"@babel/cli": "7.25.6",
51-
"@babel/core": "7.25.2",
52-
"@babel/plugin-transform-runtime": "7.25.4",
53-
"@babel/preset-env": "7.25.4",
54-
"@babel/preset-typescript": "7.24.7",
55-
"@faker-js/faker": "8.4.1",
48+
"@babel/cli": "7.25.7",
49+
"@babel/core": "7.25.7",
50+
"@babel/plugin-transform-runtime": "7.25.7",
51+
"@babel/preset-env": "7.25.7",
52+
"@babel/preset-typescript": "7.25.7",
53+
"@faker-js/faker": "9.0.3",
5654
"@storybook/addon-essentials": "7.6.17",
57-
"@storybook/addon-styling-webpack": "1.0.0",
5855
"@storybook/react": "7.6.17",
5956
"@storybook/react-webpack5": "7.6.17",
60-
"@stylistic/eslint-plugin": "2.7.2",
57+
"@stylistic/eslint-plugin": "2.8.0",
6158
"@testing-library/dom": "10.4.0",
6259
"@testing-library/jest-dom": "6.5.0",
6360
"@testing-library/react": "16.0.1",
6461
"@testing-library/user-event": "14.5.2",
65-
"@types/jest": "29.5.12",
66-
"@types/node": "22.5.3",
62+
"@types/jest": "29.5.13",
63+
"@types/node": "22.7.4",
6764
"@types/ramda": "0.30.2",
68-
"@types/react": "18.3.5",
65+
"@types/react": "18.3.11",
6966
"@types/sprintf-js": "1.1.4",
7067
"@types/uuid": "10.0.0",
71-
"@typescript-eslint/eslint-plugin": "8.4.0",
72-
"@typescript-eslint/parser": "8.4.0",
73-
"babel-loader": "9.1.3",
68+
"@typescript-eslint/eslint-plugin": "8.8.0",
69+
"@typescript-eslint/parser": "8.8.0",
70+
"babel-loader": "9.2.1",
7471
"babel-plugin-import": "1.13.8",
7572
"babel-plugin-module-resolver": "5.0.2",
7673
"eslint": "8.57.0",
7774
"eslint-config-prettier": "9.1.0",
7875
"eslint-import-resolver-typescript": "3.6.3",
79-
"eslint-plugin-import": "2.30.0",
76+
"eslint-plugin-import": "2.31.0",
8077
"eslint-plugin-prettier": "5.2.1",
81-
"eslint-plugin-react": "7.35.2",
78+
"eslint-plugin-react": "7.37.1",
8279
"eslint-plugin-react-hooks": "4.6.2",
8380
"fs-extra": "11.2.0",
8481
"identity-obj-proxy": "3.0.0",
@@ -91,8 +88,8 @@
9188
"styled-components": "6.1.13",
9289
"ts-jest": "29.2.5",
9390
"ts-loader": "9.5.1",
94-
"typescript": "5.5.4",
95-
"webpack": "5.94.0"
91+
"typescript": "5.6.2",
92+
"webpack": "5.95.0"
9693
},
9794
"peerDependencies": {
9895
"react": "^17.0.0 || ^18.0.0",

src/core/data-display/advertise/styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import Typography from '@/core/data-display/typography'
33
import Paper from '@/core/surfaces/paper'
44
import { theme } from '@/theme'
55

6-
const { grays } = theme.colors
6+
const { gray } = theme.colors
77

88
export const AdvertiseTypography = styled(Typography)`
99
&& {
10-
border-left: 1px solid ${grays.g5};
10+
border-left: 1px solid ${gray[400]};
1111
}
1212
`
1313

src/core/data-display/chapter/styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { default as styled } from 'styled-components'
22
import type { LineProps } from '.'
33
import { theme } from '@/theme'
44

5-
const { grays } = theme.colors
5+
const { gray } = theme.colors
66

77
export const Line = styled.div<LineProps>`
88
height: 1px;
99
flex: 1;
1010
min-height: 0.75px;
1111
max-height: 3px;
1212
align-self: center;
13-
background-color: ${props => (props.primary ? grays.g4 : grays.g6)};
13+
background-color: ${props => (props.primary ? gray[500] : gray[300])};
1414
`
1515

1616
export const Container = styled.div`

src/core/data-display/line/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import type { DefaultProps } from '../../types'
33
import { theme } from '@/theme'
44

5-
const { grays, secondary } = theme.colors
5+
const { gray, secondary } = theme.colors
66

77
export interface LineProps extends DefaultProps {
88
primary?: boolean
@@ -21,7 +21,7 @@ const Line = ({
2121
flex: 1,
2222
padding,
2323
margin,
24-
border: `1px solid ${primary ? secondary.light : grays.g6}`,
24+
border: `1px solid ${primary ? secondary.light : gray[300]}`,
2525
...style
2626
}}
2727
{...otherProps}

src/core/data-display/line/line.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'
33
import Line from '.'
44
import { theme } from '@/theme'
55

6-
const { grays, secondary } = theme.colors
6+
const { gray, secondary } = theme.colors
77

88
describe('Line', () => {
99
it('should render closed', () => {
@@ -32,7 +32,7 @@ describe('Line', () => {
3232
expect(element).toHaveProperty('style.padding', '5px')
3333
expect(element).toHaveProperty(
3434
'style.border',
35-
`1px solid ${grays.g6.toLowerCase()}`
35+
`1px solid ${gray[300].toLowerCase()}`
3636
)
3737
})
3838

src/core/data-display/list/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createStyles, makeStyles } from '@mui/styles'
55
import type { DefaultProps } from '../../types'
66
import { theme } from '@/theme'
77

8-
const { app } = theme.colors
8+
const { neutral } = theme.colors
99

1010
export interface ListProps extends DefaultProps {
1111
title?: string
@@ -16,7 +16,7 @@ export interface ListProps extends DefaultProps {
1616
const useStyles = makeStyles(() =>
1717
createStyles({
1818
default: {
19-
backgroundColor: app.background.main
19+
backgroundColor: neutral[100]
2020
},
2121
inherit: {
2222
backgroundColor: 'inherit',

src/core/data-display/table/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { DefaultProps } from '../../types'
44
import type { TableProps } from '@mui/material/Table'
55
import { theme } from '@/theme'
66

7-
const { grays } = theme.colors
7+
const { gray } = theme.colors
88

99
export interface ITableProps extends DefaultProps, Omit<TableProps, 'padding'> {
1010
spacing?: 'normal' | 'checkbox' | 'none'
@@ -22,7 +22,7 @@ const Table = ({
2222
{...otherProps}
2323
padding={spacing}
2424
style={{
25-
border: `1px solid ${grays.g6}`,
25+
border: `1px solid ${gray[300]}`,
2626
padding,
2727
margin,
2828
...style

src/core/data-display/table/table-footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { DefaultProps } from '../../types'
44
import type { TableFooterProps } from '@mui/material/TableFooter'
55
import { theme } from '@/theme'
66

7-
const { grays } = theme.colors
7+
const { gray } = theme.colors
88

99
export interface ITableFooterProps extends DefaultProps, TableFooterProps {}
1010

@@ -16,7 +16,7 @@ const TableFooter = ({
1616
}: ITableFooterProps) => (
1717
<MuiTableFooter
1818
style={{
19-
borderColor: grays.g7,
19+
borderColor: gray[200],
2020
margin,
2121
padding,
2222
...style

src/core/data-display/table/table-pagination.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import MuiTablePagination from '@mui/material/TablePagination'
44
import type { TablePaginationProps } from '@mui/material/TablePagination'
55
import { theme } from '@/theme'
66

7-
const { grays } = theme.colors
7+
const { gray } = theme.colors
88

99
interface ITablePaginationProps
1010
extends Omit<
@@ -54,12 +54,12 @@ const TablePagination = ({
5454
return `${from}-${to} de ${count !== -1 ? count : `mais que ${to}`}`
5555
}}
5656
style={{
57-
borderColor: grays.g7,
57+
borderColor: gray[200],
5858
padding,
5959
...style
6060
}}
6161
sx={{
62-
borderBottom: `1px solid ${grays.g7} !important;`
62+
borderBottom: `1px solid ${gray[200]} !important;`
6363
}}
6464
onPageChange={onPageChange}
6565
onRowsPerPageChange={onRowsPerPageChange}

src/core/data-display/table/table-row.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { DefaultProps } from '../../types'
55
import type { TableRowProps } from '@mui/material/TableRow'
66
import { theme } from '@/theme'
77

8-
const { grays } = theme.colors
8+
const { gray } = theme.colors
99

1010
export interface ITableRowProps extends DefaultProps, TableRowProps {
1111
selected?: boolean
@@ -26,7 +26,7 @@ const TableRow = ({
2626
{...otherProps}
2727
style={{
2828
background,
29-
borderColor: grays.g7,
29+
borderColor: gray[200],
3030
margin,
3131
padding,
3232
...style

src/core/feedback/progress/progress.stories.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import type { Meta, StoryFn } from '@storybook/react'
33
import Progress from '.'
44
import { theme } from '@/theme'
55

6+
const { deepOrange } = theme.colors
7+
68
export default {
79
title: 'Feedback/Progress',
810
component: Progress
@@ -85,6 +87,6 @@ LinearWithCustom.args = {
8587
variant: 'determinate',
8688
value: 75,
8789
valueBuffer: 100,
88-
primaryColor: `${theme.colors.graphic.red.main}80`,
89-
barPrimaryColor: theme.colors.graphic.red.main
90+
primaryColor: `${deepOrange[600]}80`,
91+
barPrimaryColor: deepOrange[600]
9092
}

src/core/feedback/skeleton/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from 'react'
22
import type { SkeletonProps } from 'react-loading-skeleton'
33
import SkeletonLoading from 'react-loading-skeleton'
4-
import 'react-loading-skeleton/dist/skeleton.css'
54
import { theme } from '@/theme'
5+
import 'react-loading-skeleton/dist/skeleton.css'
66

7-
const { grays } = theme.colors
7+
const { gray } = theme.colors
88

99
const Skeleton = (props: SkeletonProps) => (
1010
<SkeletonLoading
1111
containerTestId='skeleton-container'
12-
baseColor={grays.g7}
13-
highlightColor={grays.g6}
12+
baseColor={gray[200]}
13+
highlightColor={gray[300]}
1414
{...props}
1515
/>
1616
)

src/core/feedback/snackbar/index.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ import {
77
Info as IconInfo,
88
Warning as IconWarning
99
} from '@mui/icons-material'
10-
import { amber, blue, green, red } from '@mui/material/colors'
1110
import MuiSnackbar from '@mui/material/Snackbar'
1211
import MuiSnackbarContent from '@mui/material/SnackbarContent'
1312
import type { DefaultProps } from '../../types'
1413
import type { TransitionProps } from '@mui/material/transitions'
1514
import IconButton from '@/core/inputs/icon-button'
15+
import { theme } from '@/theme'
16+
17+
const { blue, green, orange, red } = theme.colors
1618

1719
export interface SnackBarProps extends DefaultProps {
1820
autoHide?: number
@@ -39,19 +41,19 @@ export interface SnackBarProps extends DefaultProps {
3941

4042
const variants = {
4143
error: {
42-
color: red[700],
44+
color: red[500],
4345
icon: IconError
4446
},
4547
info: {
46-
color: blue[500],
48+
color: blue[600],
4749
icon: IconInfo
4850
},
4951
success: {
50-
color: green[700],
52+
color: green[400],
5153
icon: IconCheck
5254
},
5355
warning: {
54-
color: amber[700],
56+
color: orange[600],
5557
icon: IconWarning
5658
}
5759
}

0 commit comments

Comments
 (0)