From a4f293d7081a8fd4db3d654c74d23348268d93df Mon Sep 17 00:00:00 2001 From: Jamey Huffnagle Date: Thu, 14 Mar 2024 12:19:34 -0400 Subject: [PATCH] fix remaining import issues --- components/src/atoms/buttons/AlertPrimaryButton.tsx | 4 ++-- components/src/atoms/buttons/PrimaryButton.tsx | 4 ++-- components/src/atoms/buttons/SecondaryButton.tsx | 6 ++++-- .../src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx | 4 ++-- .../src/atoms/buttons/__tests__/PrimaryButton.test.tsx | 4 ++-- .../src/atoms/buttons/__tests__/SecondaryButton.test.tsx | 4 ++-- components/src/hardware-sim/Deck/FlexTrash.tsx | 4 ++-- .../hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx | 4 ++-- components/src/hardware-sim/DeckConfigurator/constants.ts | 4 ++-- components/src/hardware-sim/Module/Thermocycler/index.tsx | 3 +-- components/src/helix-design-system/borders.ts | 2 -- components/src/index.ts | 1 - components/src/modals/ModalShell.tsx | 4 ++-- .../molecules/LocationIcon/__tests__/LocationIcon.test.tsx | 4 ++-- components/src/molecules/LocationIcon/index.tsx | 4 ++-- components/src/molecules/RoundTab.tsx | 4 ++-- components/src/tooltips/Tooltip.tsx | 5 ++--- components/src/ui-style-constants/index.ts | 1 - 18 files changed, 31 insertions(+), 35 deletions(-) diff --git a/components/src/atoms/buttons/AlertPrimaryButton.tsx b/components/src/atoms/buttons/AlertPrimaryButton.tsx index 6489c6751d3..2c87987f76c 100644 --- a/components/src/atoms/buttons/AlertPrimaryButton.tsx +++ b/components/src/atoms/buttons/AlertPrimaryButton.tsx @@ -1,6 +1,6 @@ import styled from 'styled-components' -import { BORDERS, TYPOGRAPHY, SPACING } from '../../ui-style-constants' -import { COLORS } from '../../helix-design-system' +import { TYPOGRAPHY, SPACING } from '../../ui-style-constants' +import { BORDERS, COLORS } from '../../helix-design-system' import { NewAlertPrimaryBtn, styleProps } from '../../primitives' export const AlertPrimaryButton = styled(NewAlertPrimaryBtn)` diff --git a/components/src/atoms/buttons/PrimaryButton.tsx b/components/src/atoms/buttons/PrimaryButton.tsx index fae0b86f8ef..e4075770b9d 100644 --- a/components/src/atoms/buttons/PrimaryButton.tsx +++ b/components/src/atoms/buttons/PrimaryButton.tsx @@ -1,6 +1,6 @@ import styled from 'styled-components' -import { BORDERS, TYPOGRAPHY, SPACING } from '../../ui-style-constants' -import { COLORS } from '../../helix-design-system' +import { TYPOGRAPHY, SPACING } from '../../ui-style-constants' +import { BORDERS, COLORS } from '../../helix-design-system' import { NewPrimaryBtn, styleProps } from '../../primitives' export const PrimaryButton = styled(NewPrimaryBtn)` diff --git a/components/src/atoms/buttons/SecondaryButton.tsx b/components/src/atoms/buttons/SecondaryButton.tsx index 56f51f9845d..c5f2a9dbcaf 100644 --- a/components/src/atoms/buttons/SecondaryButton.tsx +++ b/components/src/atoms/buttons/SecondaryButton.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components' -import { BORDERS, TYPOGRAPHY, SPACING } from '../../ui-style-constants' + +import { TYPOGRAPHY, SPACING } from '../../ui-style-constants' import { isntStyleProp, styleProps } from '../../primitives' -import { COLORS } from '../../helix-design-system' +import { BORDERS, COLORS } from '../../helix-design-system' + import type { StyleProps } from '../../index' interface SecondaryButtonProps extends StyleProps { diff --git a/components/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx b/components/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx index 7d4173a2dd8..3080dae524c 100644 --- a/components/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx @@ -3,8 +3,8 @@ import { describe, it, beforeEach, expect } from 'vitest' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { renderWithProviders } from '../../../testing/utils' -import { COLORS } from '../../../helix-design-system' -import { BORDERS, TYPOGRAPHY, SPACING } from '../../../ui-style-constants' +import { BORDERS, COLORS } from '../../../helix-design-system' +import { TYPOGRAPHY, SPACING } from '../../../ui-style-constants' import { AlertPrimaryButton } from '../AlertPrimaryButton' diff --git a/components/src/atoms/buttons/__tests__/PrimaryButton.test.tsx b/components/src/atoms/buttons/__tests__/PrimaryButton.test.tsx index 24a4d962c6e..651b17e2de8 100644 --- a/components/src/atoms/buttons/__tests__/PrimaryButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/PrimaryButton.test.tsx @@ -3,8 +3,8 @@ import { describe, it, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { renderWithProviders } from '../../../testing/utils' -import { COLORS } from '../../../helix-design-system' -import { BORDERS, TYPOGRAPHY, SPACING } from '../../../ui-style-constants' +import { BORDERS, COLORS } from '../../../helix-design-system' +import { TYPOGRAPHY, SPACING } from '../../../ui-style-constants' import { PrimaryButton } from '../PrimaryButton' const render = (props: React.ComponentProps) => { diff --git a/components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx b/components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx index 55e4e93f871..1b461ffd9a5 100644 --- a/components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx @@ -3,8 +3,8 @@ import { describe, it, beforeEach, expect } from 'vitest' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { renderWithProviders } from '../../../testing/utils' -import { BORDERS, TYPOGRAPHY, SPACING } from '../../../ui-style-constants' -import { COLORS } from '../../../helix-design-system' +import { TYPOGRAPHY, SPACING } from '../../../ui-style-constants' +import { BORDERS, COLORS } from '../../../helix-design-system' import { SecondaryButton } from '../SecondaryButton' diff --git a/components/src/hardware-sim/Deck/FlexTrash.tsx b/components/src/hardware-sim/Deck/FlexTrash.tsx index 6db00984842..038e21f857a 100644 --- a/components/src/hardware-sim/Deck/FlexTrash.tsx +++ b/components/src/hardware-sim/Deck/FlexTrash.tsx @@ -8,8 +8,8 @@ import { import { Icon } from '../../icons' import { Flex, Text } from '../../primitives' import { ALIGN_CENTER, JUSTIFY_CENTER } from '../../styles' -import { BORDERS, SPACING, TYPOGRAPHY } from '../../ui-style-constants' -import { COLORS } from '../../helix-design-system' +import { SPACING, TYPOGRAPHY } from '../../ui-style-constants' +import { COLORS, BORDERS } from '../../helix-design-system' import { RobotCoordsForeignObject } from './RobotCoordsForeignObject' import type { RobotType } from '@opentrons/shared-data' diff --git a/components/src/hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx b/components/src/hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx index 926bdd54926..fba7dfc57cf 100644 --- a/components/src/hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx @@ -4,8 +4,8 @@ import { css } from 'styled-components' import { Icon } from '../../icons' import { Btn } from '../../primitives' import { ALIGN_CENTER, DISPLAY_FLEX, JUSTIFY_CENTER } from '../../styles' -import { BORDERS, RESPONSIVENESS } from '../../ui-style-constants' -import { COLORS } from '../../helix-design-system' +import { RESPONSIVENESS } from '../../ui-style-constants' +import { BORDERS, COLORS } from '../../helix-design-system' import { RobotCoordsForeignObject } from '../Deck/RobotCoordsForeignObject' import { COLUMN_1_X_ADJUSTMENT, diff --git a/components/src/hardware-sim/DeckConfigurator/constants.ts b/components/src/hardware-sim/DeckConfigurator/constants.ts index 7d2a35d0e8c..53faef10b7e 100644 --- a/components/src/hardware-sim/DeckConfigurator/constants.ts +++ b/components/src/hardware-sim/DeckConfigurator/constants.ts @@ -1,8 +1,8 @@ import { css } from 'styled-components' -import { COLORS } from '../../helix-design-system' +import { BORDERS, COLORS } from '../../helix-design-system' import { ALIGN_CENTER, DISPLAY_FLEX, JUSTIFY_CENTER } from '../../styles' -import { BORDERS, RESPONSIVENESS, SPACING } from '../../ui-style-constants' +import { RESPONSIVENESS, SPACING } from '../../ui-style-constants' /** * These are Flex deck configurator-only values to position a foreign object diff --git a/components/src/hardware-sim/Module/Thermocycler/index.tsx b/components/src/hardware-sim/Module/Thermocycler/index.tsx index dde2a21136a..9cec276b83b 100644 --- a/components/src/hardware-sim/Module/Thermocycler/index.tsx +++ b/components/src/hardware-sim/Module/Thermocycler/index.tsx @@ -7,8 +7,7 @@ import { } from '@opentrons/shared-data' import { C_MED_LIGHT_GRAY } from '../../../styles' -import { BORDERS } from '../../../ui-style-constants' -import { COLORS } from '../../../helix-design-system' +import { COLORS, BORDERS } from '../../../helix-design-system' import { RobotCoordsForeignDiv } from '../../Deck' import { ThermocyclerGEN1 } from './ThermocyclerGEN1' diff --git a/components/src/helix-design-system/borders.ts b/components/src/helix-design-system/borders.ts index 8f140ba7dc8..aef654ed161 100644 --- a/components/src/helix-design-system/borders.ts +++ b/components/src/helix-design-system/borders.ts @@ -1,5 +1,3 @@ -import { css } from 'styled-components' - import { COLORS } from '.' /** diff --git a/components/src/index.ts b/components/src/index.ts index 9e2c543bbc2..6e38096c4a5 100644 --- a/components/src/index.ts +++ b/components/src/index.ts @@ -30,7 +30,6 @@ export * from './ui-style-constants' // helix design system export * from './helix-design-system' -export { BORDERS } from './helix-design-system' // Pure Types export * from './robot-types' diff --git a/components/src/modals/ModalShell.tsx b/components/src/modals/ModalShell.tsx index 397d207b0b1..ffe9d44d08b 100644 --- a/components/src/modals/ModalShell.tsx +++ b/components/src/modals/ModalShell.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import styled from 'styled-components' -import { BORDERS, SPACING } from '../ui-style-constants' -import { COLORS } from '../helix-design-system' +import { SPACING } from '../ui-style-constants' +import { BORDERS, COLORS } from '../helix-design-system' import { StyleProps, styleProps } from '../primitives' import { POSITION_FIXED, diff --git a/components/src/molecules/LocationIcon/__tests__/LocationIcon.test.tsx b/components/src/molecules/LocationIcon/__tests__/LocationIcon.test.tsx index ac0d4a8eeb3..9521bbbf8ea 100644 --- a/components/src/molecules/LocationIcon/__tests__/LocationIcon.test.tsx +++ b/components/src/molecules/LocationIcon/__tests__/LocationIcon.test.tsx @@ -2,8 +2,8 @@ import * as React from 'react' import { describe, it, beforeEach, expect } from 'vitest' import { renderWithProviders } from '../../../testing/utils' import { screen } from '@testing-library/react' -import { BORDERS, SPACING } from '../../../ui-style-constants' -import { COLORS } from '../../../helix-design-system' +import { SPACING } from '../../../ui-style-constants' +import { BORDERS, COLORS } from '../../../helix-design-system' import { LocationIcon } from '..' diff --git a/components/src/molecules/LocationIcon/index.tsx b/components/src/molecules/LocationIcon/index.tsx index 6e31d2fd387..1916692a474 100644 --- a/components/src/molecules/LocationIcon/index.tsx +++ b/components/src/molecules/LocationIcon/index.tsx @@ -4,8 +4,8 @@ import { css } from 'styled-components' import { Icon } from '../../icons' import { Flex, Text } from '../../primitives' import { ALIGN_CENTER } from '../../styles' -import { BORDERS, SPACING, TYPOGRAPHY } from '../../ui-style-constants' -import { COLORS } from '../../helix-design-system' +import { SPACING, TYPOGRAPHY } from '../../ui-style-constants' +import { BORDERS, COLORS } from '../../helix-design-system' import type { IconName } from '../../icons' import type { StyleProps } from '../../primitives' diff --git a/components/src/molecules/RoundTab.tsx b/components/src/molecules/RoundTab.tsx index c9c2f772ee4..29dd54e2e16 100644 --- a/components/src/molecules/RoundTab.tsx +++ b/components/src/molecules/RoundTab.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { css } from 'styled-components' -import { TYPOGRAPHY, BORDERS, SPACING } from '../ui-style-constants' -import { COLORS } from '../helix-design-system' +import { TYPOGRAPHY, SPACING } from '../ui-style-constants' +import { COLORS, BORDERS } from '../helix-design-system' import { POSITION_RELATIVE } from '../styles' import { Btn } from '../primitives' diff --git a/components/src/tooltips/Tooltip.tsx b/components/src/tooltips/Tooltip.tsx index 73214bc2201..70617d6dcfa 100644 --- a/components/src/tooltips/Tooltip.tsx +++ b/components/src/tooltips/Tooltip.tsx @@ -1,12 +1,11 @@ import * as React from 'react' import { css } from 'styled-components' -import { borderRadius4 } from '../ui-style-constants/borders' +import { BORDERS, COLORS } from '../helix-design-system' import { fontSizeH4 } from '../ui-style-constants/typography' import { spacing8 } from '../ui-style-constants/spacing' import { ARROW_SIZE_PX } from './styles' import { Box } from '../primitives' -import { COLORS } from '../helix-design-system' import type { CSSProperties } from 'react' import type { FlattenSimpleInterpolation } from 'styled-components' @@ -63,7 +62,7 @@ export const Tooltip = React.forwardRef(function TooltipComponent( filter: drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.2)); cursor: pointer; font-size: ${fontSize}; - border-radius: ${borderRadius4}; + border-radius: ${BORDERS.borderRadius4}; ` return visible ? ( diff --git a/components/src/ui-style-constants/index.ts b/components/src/ui-style-constants/index.ts index b33b88ba25e..21a599f031c 100644 --- a/components/src/ui-style-constants/index.ts +++ b/components/src/ui-style-constants/index.ts @@ -1,4 +1,3 @@ -export * as BORDERS from './borders' export * as RESPONSIVENESS from './responsiveness' export * as TYPOGRAPHY from './typography' export * as SPACING from './spacing'