Skip to content

Commit

Permalink
refactor(box): move to packages for split versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanoglesby08 committed Feb 13, 2018
1 parent 53a2a8b commit 8cdd965
Show file tree
Hide file tree
Showing 27 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion config/styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = {
name: 'Layout',
components() {
return [
path.resolve('src/components/Box/Box.jsx'),
path.resolve('packages/Box/Box.jsx'),
path.resolve('src/components/Responsive/Responsive.jsx'),
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Logo/Logo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react'
import { version } from '../../../package.json'
import logo from './Logo.svg'

import Box from '../../../src/components/Box/Box'
import Box from '../../../packages/Box/Box'
import Text from '../../../src/components/Typography/Text/Text'
import ChevronLink from '../../../src/components/Link/ChevronLink/ChevronLink'

Expand Down
4 changes: 2 additions & 2 deletions docs/components/MarkdownHeading/MarkdownHeading.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react'
import PropTypes from 'prop-types'

import Box from '../../../src/components/Box/Box'
import Box from '../../../packages/Box/Box'
import Heading from '../../../src/components/Typography/Heading/Heading'

const MarkdownHeading = ({level, children}) => (
const MarkdownHeading = ({ level, children }) => (
<Box below={3}>
<Heading level={level}>{children}</Heading>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions docs/components/MarkdownOrderedList/MarkdownOrderedList.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react'
import PropTypes from 'prop-types'

import Box from '../../../src/components/Box/Box'
import Box from '../../../packages/Box/Box'
import OrderedList from '../../../src/components/Lists/OrderedList/OrderedList'
import Text from '../../../src/components/Typography/Text/Text'

const MarkdownOrderedList = ({children}) => (
const MarkdownOrderedList = ({ children }) => (
<Box below={3}>
<Text block size="medium">
<OrderedList>
Expand Down
4 changes: 2 additions & 2 deletions docs/components/MarkdownParagraph/MarkdownParagraph.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react'
import PropTypes from 'prop-types'

import Box from '../../../src/components/Box/Box'
import Box from '../../../packages/Box/Box'
import Paragraph from '../../../src/components/Typography/Paragraph/Paragraph'

const MarkdownParagraph = ({small, children}) => (
const MarkdownParagraph = ({ small, children }) => (
<Box below={3}>
<Paragraph size={small ? 'small' : 'medium'}>{children}</Paragraph>
</Box>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'

import Box from '../../../src/components/Box/Box'
import Box from '../../../packages/Box/Box'
import UnorderedList from '../../../src/components/Lists/UnorderedList/UnorderedList'
import Text from '../../../src/components/Typography/Text/Text'

Expand Down
4 changes: 2 additions & 2 deletions docs/components/SectionHeading/SectionHeadingRenderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import PropTypes from 'prop-types'

import Heading from '../../../src/components/Typography/Heading/Heading'
import Flexbox from '../../../src/components/Flexbox/Flexbox'
import Box from '../../../src/components/Box/Box'
import Box from '../../../packages/Box/Box'

import styles from './SectionHeadingRenderer.modules.scss'

const SectionHeadingRenderer = ({id, depth, toolbar, children}) => {
const SectionHeadingRenderer = ({ id, depth, toolbar, children }) => {
const level = Math.min(depth, 4)

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import Box from '../../../src/components/Box/Box'
import Box from '../../../packages/Box/Box'
import Input from '../../../src/components/Input/Input'

const TableOfContentsRenderer = ({ children, searchTerm, onSearchTermChange }) => {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Box/Box.jsx → packages/Box/Box.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react'
import PropTypes from 'prop-types'
import Responsive from '../Responsive/Responsive'
import Responsive from '../../src/components/Responsive/Responsive'

import safeRest from '../../utils/safeRest'
import joinClassNames from '../../utils/joinClassNames'
import capitalize from '../../utils/capitalize'
import safeRest from '../../src/utils/safeRest'
import joinClassNames from '../../src/utils/joinClassNames'
import capitalize from '../../src/utils/capitalize'

import styles from './Box.modules.scss'

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { mount } from 'enzyme'

import Box from '../Box'

import mockMatchMedia from '../../../__mocks__/matchMedia'
import mockMatchMedia from '../../../src/__mocks__/matchMedia'

describe('Box', () => {
const defaultProps = { between: 3 }
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/Card/Card.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'

import Box from '../Box/Box'
import Box from '../../../packages/Box/Box'
import safeRest from '../../utils/safeRest'

import styles from './Card.modules.scss'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Choice/Choice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import generateId from '../../utils/generateId'

import Text from '../Typography/Text/Text'
import Paragraph from '../Typography/Paragraph/Paragraph'
import Box from '../Box/Box'
import Box from '../../../packages/Box/Box'
import ColoredTextProvider from '../Typography/ColoredTextProvider/ColoredTextProvider'
import Flexbox from '../Flexbox/Flexbox'
import InputFeedback from '../InputFeedback/InputFeedback'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import PropTypes from 'prop-types'
import { childrenOfType } from 'airbnb-prop-types'

import Box from '../../Box/Box'
import Box from '../../../../packages/Box/Box'
import Clickable from '../../Clickable/Clickable'
import DecorativeIcon from '../../Icons/DecorativeIcon/DecorativeIcon'
import Text from '../../Typography/Text/Text'
Expand Down
2 changes: 1 addition & 1 deletion src/components/FormField/FormField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { childrenOfType } from 'airbnb-prop-types'
import safeRest from '../../utils/safeRest'
import generateId from '../../utils/generateId'

import Box from '../Box/Box'
import Box from '../../../packages/Box/Box'
import Flexbox from '../Flexbox/Flexbox'
import Text from '../Typography/Text/Text'
import Paragraph from '../Typography/Paragraph/Paragraph'
Expand Down
2 changes: 1 addition & 1 deletion src/components/FormField/FormField.modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

margin: 0;
// This vertical padding fixes an IE11 bug that was causing the input value to jump slightly and get cut off.
composes: verticalPadding-2 horizontalPadding-3 from '../Box/Box.modules.scss';
composes: verticalPadding-2 horizontalPadding-3 from '../../../packages/Box/Box.modules.scss';

composes: thin rounded from '../Borders.modules.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/InputFeedback/InputFeedback.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'

import Box from '../Box/Box'
import Box from '../../../packages/Box/Box'

import safeRest from '../../utils/safeRest'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Link/ChevronLink/ChevronLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import DecorativeIcon from '../../../components/Icons/DecorativeIcon/DecorativeI
import safeRest from '../../../utils/safeRest'
import { warn } from '../../../utils/warn'

import Box from '../../Box/Box'
import Box from '../../../../packages/Box/Box'

import styles from './ChevronLink.modules.scss'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Lists/OrderedList/OrderedList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { childrenOfType } from 'airbnb-prop-types'
import safeRest from '../../../utils/safeRest'

import OrderedItem from './OrderedItem'
import Box from '../../Box/Box'
import Box from '../../../../packages/Box/Box'

import styles from './OrderedList.modules.scss'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Lists/UnorderedList/UnorderedList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { childrenOfType } from 'airbnb-prop-types'
import safeRest from '../../../utils/safeRest'

import UnorderedItem from './UnorderedItem/UnorderedItem'
import Box from '../../Box/Box'
import Box from '../../../../packages/Box/Box'

import styles from '../List.modules.scss'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Notification/Notification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import FlexGrid from '../../components/FlexGrid/FlexGrid'
import DecorativeIcon from '../Icons/DecorativeIcon/DecorativeIcon'
import ColoredTextProvider from '../Typography/ColoredTextProvider/ColoredTextProvider'
import Paragraph from '../Typography/Paragraph/Paragraph'
import Box from '../Box/Box'
import Box from '../../../packages/Box/Box'

import messagingStyles from '../Messaging.modules.scss'
import styles from './Notification.modules.scss'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Select/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import DecorativeIcon from '../Icons/DecorativeIcon/DecorativeIcon'
import Tooltip from '../Tooltip/Tooltip'
import FormField from '../FormField/FormField'
import FeedbackIcon from '../FormField/FeedbackIcon'
import Box from '../Box/Box'
import Box from '../../../packages/Box/Box'

import addRightPadding from '../FormField/addRightPadding'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Tooltip/Bubble.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import joinClassNames from '../../utils/joinClassNames'

import Text from '../Typography/Text/Text'
import Box from '../Box/Box'
import Box from '../../../packages/Box/Box'

import styles from './Tooltip.modules.scss'
import displayStyles from '../Display.modules.scss'
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import './scss/global.scss'

export { default as Accordion } from './components/ExpandCollapse/Accordion/Accordion'
export { default as Box } from './components/Box/Box'
export { default as Box } from '../packages/Box/Box'
export { default as Button } from './components/Button/Button'
export { default as ButtonLink } from './components/Link/ButtonLink/ButtonLink'
export { default as Card } from './components/Card/Card'
Expand Down

0 comments on commit 8cdd965

Please sign in to comment.