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

chore/remove nginformatica styleguide #336

Merged
merged 5 commits into from
Jan 5, 2024
Merged
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
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flipper-ui",
"version": "0.30.8",
"version": "0.30.9",
"description": "",
"main": "dist/index.js",
"homepage": "https://flipper-ui.ngi.com.br/",
Expand Down Expand Up @@ -47,7 +47,6 @@
"faker": "5.5.3",
"material-table": "1.69.3",
"material-ui-chip-input": "2.0.0-beta.2",
"nginformatica-styleguide": "1.0.2",
"ramda": "0.25.0",
"react-loading-skeleton": "3.3.1",
"react-number-format": "4.4.1",
Expand Down
4 changes: 2 additions & 2 deletions src/core/data-display/chapter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { TypographyProps } from '@material-ui/core/Typography'
import React, { CSSProperties } from 'react'
import styled from 'styled-components'
import { DefaultProps } from '../../types'
import Typography from '@/core/data-display/typography'
import { theme } from 'nginformatica-styleguide'
import type { TypographyProps } from '@material-ui/core/Typography'
import { theme } from '@/theme'

const { grays } = theme.colors

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useCallback, useState } from 'react'
import type { Meta, StoryObj } from '@storybook/react'
import { ThemeProvider } from 'styled-components'
import { muiThemeOptions, theme } from '../../../theme'
import ThemeProviderFlipper from '../../context/theme-provider'
import CircularProgress from '@mui/material/CircularProgress'
import Button from '@/core/inputs/button'
import ValidationDialog, { ValidationStatus } from '.'
import { CheckCircleOutline, CancelOutlined } from '../../../icons'
import { muiThemeOptions, theme } from '@/theme'

const { action, secondary } = theme.colors

Expand Down
6 changes: 3 additions & 3 deletions src/core/surfaces/step-card/step-card-details.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react'
import { List } from '@material-ui/core'
import MuiAccordionDetails from '@material-ui/core/AccordionDetails'
import { theme } from 'nginformatica-styleguide'
import React from 'react'
import { IStepCardProps } from '.'
import { CheckCircle as CheckCircleIcon, Help as HelpIcon } from '@/icons'
import IconButton from '@/core/inputs/icon-button'
import Typography from '@/core/data-display/typography'
import { IStepCardProps } from '.'
import { ListItemContainer, StepCardColumn } from './styles'
import { theme } from '@/theme'

const { feedback, grays } = theme.colors
const DONE_COLOR = feedback.success
Expand Down
4 changes: 2 additions & 2 deletions src/core/surfaces/step-card/step-card-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import { LinearProgress } from '@material-ui/core'
import MuiAccordionSummary from '@material-ui/core/AccordionSummary'
import { theme } from 'nginformatica-styleguide'
import React from 'react'
import { sprintf } from 'sprintf-js'
import { IStepCardProps } from '.'
import {
Expand All @@ -17,6 +16,7 @@ import {
StepContainer,
TitleContainer
} from './styles'
import { theme } from '@/theme'

const { feedback, grays } = theme.colors
const DONE_COLOR = feedback.success
Expand Down
4 changes: 2 additions & 2 deletions src/core/surfaces/step-card/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from '@material-ui/core'
import { theme } from 'nginformatica-styleguide'
import styled from 'styled-components'
import { Box } from '@material-ui/core'
import { theme } from '@/theme'

interface IStepContainerProps {
padding?: React.CSSProperties['padding']
Expand Down
4 changes: 2 additions & 2 deletions src/experimental/breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { ReactNode } from 'react'
import styled from 'styled-components'
import { addIndex, map } from 'ramda'
import { ChevronRight as IconChevronRight } from '@/icons'
import { theme } from 'nginformatica-styleguide'
import styled from 'styled-components'
import { Typography, Breadcrumb } from '@/index'
import { theme } from '@/theme'

const imap = addIndex(map)

Expand Down
15 changes: 7 additions & 8 deletions src/experimental/dialog/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Dialog as DialogFlipper, Button, ThemeProviderFlipper } from '@/index'
import React, { MouseEvent, ReactNode } from 'react'
import { theme as Theme } from 'nginformatica-styleguide'
import { Dialog as DialogFlipper, Button, ThemeProviderFlipper } from '@/index'
import { theme } from '@/theme'

const ACTION_REMOVE = Theme.colors.action.cancel
const PRIMARY_DARK = Theme.colors.primary.main
const { action, primary } = theme.colors

export interface IProps {
open: boolean
Expand All @@ -24,13 +23,13 @@ export interface IProps {
onClose?(): void
}

const theme = {
const themeDialog = {
palette: {
primary: {
main: PRIMARY_DARK
main: primary.main
},
secondary: {
main: ACTION_REMOVE
main: action.cancel
},
typography: {
useNextVariants: true
Expand Down Expand Up @@ -62,7 +61,7 @@ export const DialogV2 = (props: IProps) => {
const haveSecondaryButton = secondaryButtonText && secondaryButtonAction

return (
<ThemeProviderFlipper options={theme}>
<ThemeProviderFlipper options={themeDialog}>
<DialogFlipper
{...otherProps}
open={open}
Expand Down
6 changes: 3 additions & 3 deletions src/experimental/sidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Sidebar as FlipperSidebar, Tooltip, List, ListItem } from '@/index'
import React, { useEffect, useState, useCallback } from 'react'
import styled from 'styled-components'
import { theme } from 'nginformatica-styleguide'
import { Sidebar as FlipperSidebar, Tooltip, List, ListItem } from '@/index'
import { times, map } from 'ramda'
import styled from 'styled-components'
import { Skeleton } from '@mui/material'
import { theme } from '@/theme'

export interface ISidebarOption {
icon: React.ReactElement
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Theme.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import React from 'react'
import { Button } from 'flipper-ui'
import { ThemeProviderFlipper } from 'flipper-ui'
import { ThemeProvider } from 'styled-components'
import { muiThemeOptions, theme } from 'nginformatica-styleguide'
import { muiThemeOptions, theme } from '@/theme'

const App = () => (
<ThemeProvider theme={ theme }>
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"paths": {
"@/*": [
"./src/*"
],
]
},
},
"include": [
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8373,11 +8373,6 @@ neo-async@^2.5.0, neo-async@^2.6.2:
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==

[email protected]:
version "1.0.2"
resolved "https://registry.yarnpkg.com/nginformatica-styleguide/-/nginformatica-styleguide-1.0.2.tgz#84aa46f1bdc95f87ea08942aa3de2918b02bc225"
integrity sha512-ZTEkmkuDeE0GiA0Gfx5frwzYsbwoqFyC6N04MSkkSg0E7qEVH86IA8Jo6Uke8heBiBNqgQTLN2fgqKwtXdWMoQ==

no-case@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d"
Expand Down
Loading