Skip to content

Commit

Permalink
grey typefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Jan 11, 2024
1 parent e91eff1 commit e08c9bd
Show file tree
Hide file tree
Showing 220 changed files with 525 additions and 565 deletions.
14 changes: 7 additions & 7 deletions app/src/atoms/Chip/__tests__/Chip.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ describe('Chip', () => {
const [{ getByTestId, getByText, queryByLabelText }] = render(props)
const chip = getByTestId('Chip_basic')
const chipText = getByText('mockBasic')
expect(chip).toHaveStyle(`background-color: ${LEGACY_COLORS.grey35}`)
expect(chipText).toHaveStyle(`color: ${LEGACY_COLORS.grey60}`)
expect(chip).toHaveStyle(`background-color: ${COLORS.grey35}`)
expect(chipText).toHaveStyle(`color: ${COLORS.grey60}`)
expect(queryByLabelText('icon_mockBasic')).not.toBeInTheDocument()
})

Expand Down Expand Up @@ -94,11 +94,11 @@ describe('Chip', () => {
const [{ getByTestId, getByText, getByLabelText }] = render(props)
const chip = getByTestId('Chip_neutral')
const chipText = getByText('mockNeutral')
expect(chip).toHaveStyle(`background-color: ${LEGACY_COLORS.grey35}`)
expect(chip).toHaveStyle(`background-color: ${COLORS.grey35}`)
expect(chip).toHaveStyle(`border-radius: ${BORDERS.borderRadiusSize5}`)
expect(chipText).toHaveStyle(`color: ${LEGACY_COLORS.grey60}`)
expect(chipText).toHaveStyle(`color: ${COLORS.grey60}`)
const icon = getByLabelText('icon_mockNeutral')
expect(icon).toHaveStyle(`color: ${LEGACY_COLORS.grey60}`)
expect(icon).toHaveStyle(`color: ${COLORS.grey60}`)
})

it('should render text, icon, no bgcolor with neutral colors and bg false', () => {
Expand All @@ -112,9 +112,9 @@ describe('Chip', () => {
const chipText = getByText('mockNeutral')
expect(chip).toHaveStyle(`background-color: ${COLORS.transparent}`)
expect(chip).toHaveStyle(`border-radius: ${BORDERS.borderRadiusSize5}`)
expect(chipText).toHaveStyle(`color: ${LEGACY_COLORS.grey60}`)
expect(chipText).toHaveStyle(`color: ${COLORS.grey60}`)
const icon = getByLabelText('icon_mockNeutral')
expect(icon).toHaveStyle(`color: ${LEGACY_COLORS.grey60}`)
expect(icon).toHaveStyle(`color: ${COLORS.grey60}`)
})

it('should render text, icon, bgcolor with error colors', () => {
Expand Down
10 changes: 5 additions & 5 deletions app/src/atoms/Chip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const CHIP_PROPS_BY_TYPE: Record<
}
> = {
basic: {
backgroundColor: LEGACY_COLORS.grey35,
backgroundColor: COLORS.grey35,
borderRadius: BORDERS.borderRadiusSize1,
textColor: LEGACY_COLORS.grey60,
textColor: COLORS.grey60,
},
error: {
backgroundColor: COLORS.red3,
Expand All @@ -50,10 +50,10 @@ const CHIP_PROPS_BY_TYPE: Record<
textColor: COLORS.red1,
},
neutral: {
backgroundColor: LEGACY_COLORS.grey35,
backgroundColor: COLORS.grey35,
borderRadius: BORDERS.borderRadiusSize5,
iconColor: LEGACY_COLORS.grey60,
textColor: LEGACY_COLORS.grey60,
iconColor: COLORS.grey60,
textColor: COLORS.grey60,
},
success: {
backgroundColor: COLORS.green3,
Expand Down
2 changes: 1 addition & 1 deletion app/src/atoms/InlineNotification/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const INLINE_NOTIFICATION_PROPS_BY_TYPE: Record<
},
neutral: {
icon: { name: 'information' },
backgroundColor: LEGACY_COLORS.grey35,
backgroundColor: COLORS.grey35,
color: COLORS.black90,
},
success: {
Expand Down
2 changes: 1 addition & 1 deletion app/src/atoms/MenuList/OverflowBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const OverflowBtn = React.forwardRef(
&:active,
&:focus {
background-color: ${LEGACY_COLORS.grey35};
background-color: ${COLORS.grey35};
}
&:active circle,
Expand Down
2 changes: 1 addition & 1 deletion app/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('OverflowBtn', () => {

expect(getByRole('button')).toHaveStyleRule(
'background-color',
`${String(LEGACY_COLORS.grey35)}`,
`${String(COLORS.grey35)}`,
{
modifier: ':active',
}
Expand Down
3 changes: 1 addition & 2 deletions app/src/atoms/Slideout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
JUSTIFY_SPACE_BETWEEN,
ALIGN_CENTER,
COLORS,
LEGACY_COLORS,
Overlay,
POSITION_FIXED,
TYPOGRAPHY,
Expand Down Expand Up @@ -103,7 +102,7 @@ const CLOSE_ICON_STYLE = css`
background: ${COLORS.grey30};
}
&:active {
background: ${LEGACY_COLORS.grey35};
background: ${COLORS.grey35};
}
`

Expand Down
4 changes: 2 additions & 2 deletions app/src/molecules/GenericWizardTile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const CAPITALIZE_FIRST_LETTER_STYLE = css`
`
const GO_BACK_BUTTON_STYLE = css`
${TYPOGRAPHY.pSemiBold};
color: ${LEGACY_COLORS.grey50};
color: ${COLORS.grey50};
&:hover {
opacity: 70%;
Expand All @@ -59,7 +59,7 @@ const GO_BACK_BUTTON_STYLE = css`
`
const GO_BACK_BUTTON_DISABLED_STYLE = css`
${TYPOGRAPHY.pSemiBold};
color: ${LEGACY_COLORS.grey60};
color: ${COLORS.grey60};
`
const Title = styled.h1`
${TYPOGRAPHY.h1Default};
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/InProgressModal/InProgressModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MODAL_STYLE = css`
}
`
const SPINNER_STYLE = css`
color: ${LEGACY_COLORS.grey50};
color: ${COLORS.grey50};
opacity: 100%;
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
color: ${COLORS.darkBlackEnabled};
Expand Down
4 changes: 2 additions & 2 deletions app/src/molecules/InfoMessage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface InfoMessageProps {
export function InfoMessage({ title, body }: InfoMessageProps): JSX.Element {
return (
<Flex
backgroundColor={LEGACY_COLORS.grey10}
backgroundColor={COLORS.grey10}
flexDirection={DIRECTION_ROW}
alignItems={body != null ? ALIGN_FLEX_START : ALIGN_CENTER}
borderRadius={BORDERS.radiusSoftCorners}
Expand All @@ -32,7 +32,7 @@ export function InfoMessage({ title, body }: InfoMessageProps): JSX.Element {
data-testid={`InfoMessage_${title}`}
>
<Icon
color={LEGACY_COLORS.grey50}
color={COLORS.grey50}
name="information"
aria-label="icon_information"
size={SIZE_1}
Expand Down
4 changes: 2 additions & 2 deletions app/src/molecules/InstrumentCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function InstrumentCard(props: InstrumentCardProps): JSX.Element {
return (
<Flex
alignItems={ALIGN_FLEX_START}
backgroundColor={LEGACY_COLORS.grey10}
backgroundColor={COLORS.grey10}
borderRadius={BORDERS.radiusSoftCorners}
gridGap={SPACING.spacing8}
padding={SPACING.spacing16}
Expand Down Expand Up @@ -97,7 +97,7 @@ export function InstrumentCard(props: InstrumentCardProps): JSX.Element {
{banner}
<StyledText
textTransform={TYPOGRAPHY.textTransformUppercase}
color={LEGACY_COLORS.grey50}
color={COLORS.grey50}
fontWeight={TYPOGRAPHY.fontWeightSemiBold}
fontSize={TYPOGRAPHY.fontSizeH6}
>
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/JogControls/ControlContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface ControlContainerProps extends StyleProps {
}

const CONTROL_CHILDREN_STYLES = css`
background-color: ${LEGACY_COLORS.grey10};
background-color: ${COLORS.grey10};
border-radius: ${BORDERS.radiusSoftCorners};
padding: ${SPACING.spacing16};
width: 100%;
Expand Down
32 changes: 16 additions & 16 deletions app/src/molecules/JogControls/DirectionControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const DEFAULT_BUTTON_STYLE = css`
background-color: ${COLORS.white};
color: ${COLORS.black};
box-shadow: 0 0 0;
border: 1px ${LEGACY_COLORS.grey30} solid;
border: 1px ${COLORS.grey30} solid;
}
&:active {
Expand Down Expand Up @@ -266,7 +266,7 @@ export function DirectionControl(props: DirectionControlProps): JSX.Element {
<StyledText
textAlign={TEXT_ALIGN_LEFT}
alignSelf={ALIGN_STRETCH}
color={LEGACY_COLORS.grey50}
color={COLORS.grey50}
css={TYPOGRAPHY.labelRegular}
>
{subtitle}
Expand Down Expand Up @@ -330,7 +330,7 @@ const ARROW_GRID_STYLES = css`
}
`
const ARROW_BUTTON_STYLES = css`
color: ${LEGACY_COLORS.grey50};
color: ${COLORS.grey50};
background-color: ${COLORS.white};

border: ${BORDERS.lineBorder};
Expand All @@ -342,15 +342,15 @@ const ARROW_BUTTON_STYLES = css`
justify-content: ${JUSTIFY_CENTER};
&:hover {
background-color: ${COLORS.white};
color: ${LEGACY_COLORS.grey55};
color: ${COLORS.grey55};
box-shadow: 0 0 0;
border: 1px ${LEGACY_COLORS.grey30} solid;
border: 1px ${COLORS.grey30} solid;
}

&:active {
background-color: ${COLORS.white};
color: ${LEGACY_COLORS.grey60};
border: 1px ${LEGACY_COLORS.grey30} solid;
color: ${COLORS.grey60};
border: 1px ${COLORS.grey30} solid;
}

&:focus {
Expand All @@ -359,7 +359,7 @@ const ARROW_BUTTON_STYLES = css`

&:disabled {
background-color: ${COLORS.white};
color: ${LEGACY_COLORS.grey30};
color: ${COLORS.grey30};
}

@media (max-width: 750px) {
Expand All @@ -369,28 +369,28 @@ const ARROW_BUTTON_STYLES = css`
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
width: 125px;
height: 125px;
background-color: ${LEGACY_COLORS.grey35};
background-color: ${COLORS.grey35};
color: ${COLORS.black90};
border-radius: ${BORDERS.borderRadiusSize4};

&:hover {
background-color: ${LEGACY_COLORS.grey40};
background-color: ${COLORS.grey40};
color: ${COLORS.black80};
border: 1px ${COLORS.transparent} solid;
}

&:active {
background-color: ${LEGACY_COLORS.grey40};
color: ${LEGACY_COLORS.grey60};
background-color: ${COLORS.grey40};
color: ${COLORS.grey60};
}

&:focus {
background-color: ${LEGACY_COLORS.grey40};
background-color: ${COLORS.grey40};
}

&:disabled {
background-color: ${LEGACY_COLORS.grey35};
color: ${LEGACY_COLORS.grey50};
background-color: ${COLORS.grey35};
color: ${COLORS.grey50};
border: 1px ${COLORS.transparent} solid;
}
}
Expand Down Expand Up @@ -457,7 +457,7 @@ export function TouchDirectionControl(
<Flex
flex="1"
flexDirection={DIRECTION_COLUMN}
border={`1px solid ${LEGACY_COLORS.grey50}`}
border={`1px solid ${COLORS.grey50}`}
borderRadius={BORDERS.borderRadiusSize4}
padding={SPACING.spacing16}
gridGap={SPACING.spacing16}
Expand Down
13 changes: 5 additions & 8 deletions app/src/molecules/JogControls/StepSizeControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const DEFAULT_BUTTON_STYLE = css`
background-color: ${COLORS.white};
color: ${COLORS.black};
box-shadow: 0 0 0;
border: 1px ${LEGACY_COLORS.grey30} solid;
border: 1px ${COLORS.grey30} solid;
}
&:active {
Expand Down Expand Up @@ -132,10 +132,7 @@ export function StepSizeControl(props: StepSizeControlProps): JSX.Element {
{t('jump_size')}
</StyledText>
</Flex>
<StyledText
color={LEGACY_COLORS.grey50}
css={TYPOGRAPHY.labelRegular}
>
<StyledText color={COLORS.grey50} css={TYPOGRAPHY.labelRegular}>
{JUMP_SIZE_SUBTITLE}
</StyledText>
<Box css={BUTTON_WRAPPER_STYLE}>
Expand All @@ -153,7 +150,7 @@ export function StepSizeControl(props: StepSizeControlProps): JSX.Element {
>
{t(stepSizeTranslationKeyByStep[stepSize])}
<StyledText
color={LEGACY_COLORS.grey50}
color={COLORS.grey50}
css={TYPOGRAPHY.labelRegular}
>{`${stepSize} mm`}</StyledText>
</PrimaryButton>
Expand All @@ -173,7 +170,7 @@ export function TouchStepSizeControl(props: StepSizeControlProps): JSX.Element {
<Flex
flex="3"
flexDirection={DIRECTION_COLUMN}
border={`1px solid ${LEGACY_COLORS.grey50}`}
border={`1px solid ${COLORS.grey50}`}
borderRadius={BORDERS.borderRadiusSize4}
padding={SPACING.spacing16}
gridGap={SPACING.spacing16}
Expand Down Expand Up @@ -204,7 +201,7 @@ export function TouchStepSizeControl(props: StepSizeControlProps): JSX.Element {
</StyledText>
<StyledText
as="p"
color={selected ? COLORS.white : LEGACY_COLORS.grey60}
color={selected ? COLORS.white : COLORS.grey60}
>
{`${stepSize} mm`}
</StyledText>
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/LegacyModal/LegacyModalShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const Overlay = styled.div`
cursor: default;
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
background-color: ${LEGACY_COLORS.grey50};
background-color: ${COLORS.grey50};
}
`
const ContentArea = styled.div<{ zIndex: string | number }>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,9 @@ describe('LegacyModalHeader', () => {
expect(closeIcon).toHaveStyleRule('background-color', COLORS.grey30, {
modifier: ':hover',
})
expect(closeIcon).toHaveStyleRule(
'background-color',
LEGACY_COLORS.grey35,
{
modifier: ':active',
}
)
expect(closeIcon).toHaveStyleRule('background-color', COLORS.grey35, {
modifier: ':active',
})
fireEvent.click(closeIcon)
expect(mockClose).toHaveBeenCalled()
})
Expand Down
4 changes: 1 addition & 3 deletions app/src/molecules/MiniCard/__tests__/MiniCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ describe('MiniCard', () => {
const { getByText } = render(props)
const miniCard = getByText('mock mini card')
expect(miniCard).toHaveStyle(`background-color: ${String(COLORS.white)}`)
expect(miniCard).toHaveStyle(
`border: 1px solid ${String(LEGACY_COLORS.grey30)}`
)
expect(miniCard).toHaveStyle(`border: 1px solid ${String(COLORS.grey30)}`)
expect(miniCard).toHaveStyle(
`border-radius: ${String(BORDERS.radiusSoftCorners)}`
)
Expand Down
4 changes: 2 additions & 2 deletions app/src/molecules/MiniCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ interface MiniCardProps extends StyleProps {
}
const unselectedOptionStyles = css`
background-color: ${COLORS.white};
border: 1px solid ${LEGACY_COLORS.grey30};
border: 1px solid ${COLORS.grey30};
border-radius: ${BORDERS.radiusSoftCorners};
padding: ${SPACING.spacing8};
width: 100%;
cursor: pointer;
&:hover {
border: 1px solid ${LEGACY_COLORS.grey55};
border: 1px solid ${COLORS.grey55};
}
`
const selectedOptionStyles = css`
Expand Down
2 changes: 1 addition & 1 deletion app/src/molecules/Modal/SmallModalChildren.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function SmallModalChildren(
{header}
</StyledText>
<StyledText
color={LEGACY_COLORS.grey60}
color={COLORS.grey60}
fontSize={TYPOGRAPHY.fontSize22}
fontWeight={TYPOGRAPHY.fontWeightRegular}
lineHeight={TYPOGRAPHY.lineHeight28}
Expand Down
Loading

0 comments on commit e08c9bd

Please sign in to comment.