Skip to content

Commit

Permalink
Migrate to Next PostCss default config
Browse files Browse the repository at this point in the history
  • Loading branch information
Joozty committed Apr 29, 2020
1 parent 11dfcbe commit 7df4f98
Show file tree
Hide file tree
Showing 68 changed files with 93 additions and 150 deletions.
2 changes: 1 addition & 1 deletion components/application/activity-select/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import Link from 'next/link'

import styles from './styles.css'
import styles from './styles.module.css'

import { Icon, Drawer } from 'design'
import { navigation } from 'texts'
Expand Down
2 changes: 1 addition & 1 deletion components/application/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import RepositorySelect from './repository-select'
import ActivitySelect from './activity-select'
import Head from './head'
import Logout from './logout'
import styles from './styles.css'
import styles from './styles.module.css'

import activities from 'store/activities'

Expand Down
2 changes: 1 addition & 1 deletion components/application/logout.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { AppBar } from '@oacore/design'

import styles from './logout.css'
import styles from './logout.module.css'

import { withGlobalStore } from 'store'

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/application/repository-select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { AppBar } from '@oacore/design'
import Router from 'next/router'

import styles from './repository-select.css'
import styles from './repository-select.module.css'

import { withGlobalStore } from 'store'
import { Select } from 'design'
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/document-link/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import styles from './styles.css'
import styles from './styles.module.css'

import { Button, Icon } from 'design'

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/forms/change-password/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import styles from './styles.css'
import styles from './styles.module.css'

import { IframeForm } from 'components/forms'
import { Card } from 'design'
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/forms/iframe-form.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useCallback, useRef } from 'react'

import { Card } from '../../design'
import styles from './styles.css'
import styles from './styles.module.css'

const IframeForm = ({ className, title, ...passProps }) => {
const ref = useRef(null)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/layout/app-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AppBar } from '@oacore/design'
import { classNames } from '@oacore/design/lib/utils'

import LayoutContext from './context'
import styles from './styles.css'
import styles from './styles.module.css'

import { AppBarToggle, Logo } from 'design'

Expand Down
2 changes: 1 addition & 1 deletion components/layout/container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useReducer } from 'react'
import { classNames } from '@oacore/design/lib/utils'

import { Provider } from './context'
import styles from './styles.css'
import styles from './styles.module.css'

const reducer = (state, action) => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion components/layout/main.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './styles.css'
import styles from './styles.module.css'

const Main = ({ children }) => {
const child = React.Children.only(children)
Expand Down
2 changes: 1 addition & 1 deletion components/layout/side-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AppBar } from '@oacore/design'
import { classNames } from '@oacore/design/lib/utils'

import LayoutContext from './context'
import styles from './styles.css'
import styles from './styles.module.css'

import { Logo, CloseIcon } from 'design'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
:root {
--side-bar-width: 13rem;
--app-bar-skip: 3.5rem;
}

@custom-media --screen-at-least-desktop (min-width: 728px);
@custom-media --screen-until-desktop (max-width: 727px);

.container {
--side-bar-width: 13rem;
--app-bar-skip: 3.5rem;

display: flex;
flex-direction: column;
min-height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion components/loading-bar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './styles.css'
import styles from './styles.module.css'

const LoadingBar = ({ className, tag: Tag = 'div' }) => (
<Tag className={classNames.use(styles.container).join(className)} />
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/performance-chart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { RadialBar, RadialBarChart, ResponsiveContainer } from 'recharts'

import NumericValue from '../numeric-value'
import styles from './styles.css'
import styles from './styles.module.css'

const PerformanceChart = ({ value, increase, caption }) => (
<div className={styles.container}>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/stacked-vertical-bar-chart/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react'

import styles from './styles.css'
import styles from './styles.module.css'

const StackedVerticalBarChart = React.memo(({ data }) => {
const [transformedData, setTransformedData] = useState([])
Expand Down
2 changes: 1 addition & 1 deletion components/table/row.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { classNames } from '@oacore/design/lib/utils'
import { observer } from 'mobx-react'

import styles from './styles.css'
import styles from './styles.module.css'

import { Table } from 'design'

Expand Down
2 changes: 1 addition & 1 deletion components/table/sidebar.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useRef } from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './styles.css'
import styles from './styles.module.css'

import { CloseIcon } from 'design'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
:root {
--table-sidebar-width: 30rem;
--table-border-color: var(--gray-200);
}

@custom-media --screen-at-least-desktop (min-width: 1200px);

.detail-row {
Expand All @@ -13,6 +8,9 @@
}

.table {
--table-sidebar-width: 30rem;
--table-border-color: var(--gray-200);

position: relative;
right: 30rem;
left: 0;
Expand Down
2 changes: 1 addition & 1 deletion components/table/table.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './styles.css'
import styles from './styles.module.css'
import NoDataFoundRow from './no-data-found-row'
import TableRow from './row'
import Sidebar from './sidebar'
Expand Down
2 changes: 1 addition & 1 deletion components/takedown/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import styles from './styles.css'
import styles from './styles.module.css'

import { Button, Icon } from 'design'

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/time-lag-chart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { nest } from 'd3-collection'
import { sum, mean } from 'd3-array'

import CustomTooltip from './tooltip'
import styles from './index.css'
import styles from './index.module.css'

const customTicks = {
...Object.fromEntries(
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/time-lag-chart/tooltip.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import styles from './index.css'
import styles from './index.module.css'

const Tooltip = ({ active, payload, label, aggregationSize }) => {
const index = parseInt(label, 10) * aggregationSize
Expand Down
2 changes: 1 addition & 1 deletion design/app-bar/toggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { AppBar } from '@oacore/design'
import { classNames } from '@oacore/design/lib/utils'

import styles from './toggle.css'
import styles from './toggle.module.css'

const Toggle = React.memo(({ className, tag = 'button', ...restProps }) => (
<AppBar.Item
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion design/close-icon/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './index.css'
import styles from './index.module.css'

const CloseIcon = React.forwardRef(
({ className, tag: Tag = 'span', ...restProps }, ref) => (
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion design/drawer/item.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './styles.css'
import styles from './styles.module.css'

const FlatItem = ({
children,
Expand Down
2 changes: 1 addition & 1 deletion design/drawer/list.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './styles.css'
import styles from './styles.module.css'

const List = ({ children, className, tag: Tag = 'ul', ...restProps }) => (
<Tag className={classNames.use(styles.list).join(className)} {...restProps}>
Expand Down
4 changes: 1 addition & 3 deletions design/drawer/styles.css → design/drawer/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
:root {
.list {
--drawer-list-padding-y: calc(var(--component-padding-y, 1rem) / 2);
--drawer-list-padding-x: calc(var(--component-padding-x, 1rem) / 2);
--drawer-item-padding-y: calc(var(--component-padding-y, 1rem) / 2);
--drawer-item-padding-x: calc(var(--component-padding-x, 1rem) / 2);
--drawer-item-spacing: calc(var(--component-padding-x, 1rem) / 2);
}

.list {
padding: var(--drawer-list-padding-y) var(--drawer-list-padding-x);
margin: 0;
line-height: 1;
Expand Down
2 changes: 1 addition & 1 deletion design/logo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import logoPath from './core-symbol.svg'
import styles from './index.css'
import styles from './index.module.css'

const Logo = React.memo(
({
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion design/numeral/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './styles.css'
import styles from './styles.module.css'

const Numeral = React.memo(
({ children, className, size, tag: Tag = 'div', ...restProps }) => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
:root {
.container {
--numeral-value-sm-size: 2em;
--numeral-value-md-size: 3em;
--numeral-value-lg-size: 4em;
--numeral-value-size: var(--numeral-value-md-size);
}

.container {
/* For the future */
}

Expand Down
2 changes: 1 addition & 1 deletion design/overlay/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './index.css'
import styles from './index.module.css'

const Overlay = ({
children,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion design/select/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState, useRef, useCallback } from 'react'
import { classNames } from '@oacore/design/lib/utils'

import styles from './styles.css'
import styles from './styles.module.css'

// TODO: Taken from @oacore/design
const generateId = () => Math.random().toString(36).substr(2, 9)
Expand Down
6 changes: 2 additions & 4 deletions design/select/styles.css → design/select/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
:root {
--select-background: var(--gray-50);
}

/* TODO: Better name, it's a div shown on top of input when not hovered */
.input-container {
--select-background: var(--gray-50);

position: absolute;
top: 0;
right: 0;
Expand Down
Loading

0 comments on commit 7df4f98

Please sign in to comment.