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

Prepare new design tokens (v2.0.0) #17607

Merged
merged 1 commit into from
Mar 12, 2025
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
4 changes: 2 additions & 2 deletions packages/components/src/components/RadioCard/RadioCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ReactNode } from 'react';

import styled, { css } from 'styled-components';

import { Elevation, borders, mapElevationToBorder, palette, spacingsPx } from '@trezor/theme';
import { Elevation, borders, mapElevationToBorder, paletteV1, spacingsPx } from '@trezor/theme';

import {
FrameProps,
Expand Down Expand Up @@ -71,7 +71,7 @@ export const RadioCard = ({ isActive, onClick, children, ...rest }: RadioCardPro
{isActive && (
<Box position={{ type: 'absolute', top: '-3px', right: '-3px' }}>
<IconWrapper>
<Icon name="check" size="small" color={palette.lightWhiteAlpha1000} />
<Icon name="check" size="small" color={paletteV1.lightWhiteAlpha1000} />
</IconWrapper>
</Box>
)}
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/components/Tooltip/TooltipArrow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FloatingArrow } from '@floating-ui/react';

import { palette } from '@trezor/theme';
import { paletteV1 } from '@trezor/theme';

import { TOOLTIP_BORDER_RADIUS } from './TooltipBox';
import { ArrowProps } from './TooltipFloatingUi';
Expand All @@ -9,8 +9,8 @@ export const TooltipArrow = ({ ref, context }: ArrowProps) => (
<FloatingArrow
ref={ref}
context={context}
fill={palette.darkGray300}
stroke={palette.darkGray100}
fill={paletteV1.darkGray300}
stroke={paletteV1.darkGray100}
staticOffset={TOOLTIP_BORDER_RADIUS}
strokeWidth={0}
tipRadius={1}
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/Tooltip/TooltipBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ReactElement, ReactNode } from 'react';

import styled from 'styled-components';

import { borders, palette, spacings, spacingsPx, typography } from '@trezor/theme';
import { borders, paletteV1, spacings, spacingsPx, typography } from '@trezor/theme';

import { Icon, IconName } from '../Icon/Icon';

Expand All @@ -27,7 +27,7 @@ type TooltipContainerStyledProps = {
};

const TooltipContainerStyled = styled.div<TooltipContainerStyledProps>`
background: ${palette.darkGray300};
background: ${paletteV1.darkGray300};
color: ${({ theme }) => theme.textDefault};
border-radius: ${TOOLTIP_BORDER_RADIUS};
text-align: left;
Expand Down
6 changes: 3 additions & 3 deletions packages/suite/src/components/suite/QrCode.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { QRCodeSVG } from 'qrcode.react';
import styled, { css } from 'styled-components';

import { borders, palette, spacingsPx } from '@trezor/theme';
import { borders, paletteV1, spacingsPx } from '@trezor/theme';

const Wrapper = styled.div`
display: flex;
Expand All @@ -15,7 +15,7 @@ const Wrapper = styled.div`
css`
padding: ${spacingsPx.xs};
border-radius: ${borders.radii.xs};
background-color: ${palette.lightWhiteAlpha1000};
background-color: ${paletteV1.lightWhiteAlpha1000};
`}
`;

Expand All @@ -27,7 +27,7 @@ export const QrCode = ({ value }: QrCodeProps) => (
<Wrapper>
<QRCodeSVG
bgColor="transparent"
fgColor={palette.lightGray1000}
fgColor={paletteV1.lightGray1000}
level="Q"
value={value}
style={{ width: '100%', height: '100%', objectFit: 'contain' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Description = styled.div`
justify-content: center;
align-items: center;
text-align: center;
color: ${({ theme }) => theme.legacy.TYPE_LIGHT_GREY};
color: ${({ theme }) => theme.textSubdued};
flex: 1;
`;

Expand Down Expand Up @@ -239,49 +239,12 @@ export const TransactionsGraph = memo(
? Number(balanceValueFn(data)) || yDomain[0]
: Number(balanceValueFn(data))
}
stroke={theme.legacy.TYPE_ORANGE}
stroke={theme.baseBorderWarning}
dot={false}
activeDot={false}
/>
)}
<defs>
<linearGradient
id="greenGradient"
x1="0"
y1="0"
x2="0"
y2="100%"
spreadMethod="reflect"
>
<stop
offset="0"
stopColor={theme.legacy.GRADIENT_GREEN_START}
/>
<stop
offset="1"
stopColor={theme.legacy.GRADIENT_GREEN_END}
/>
</linearGradient>
</defs>
<defs>
<linearGradient
id="redGradient"
x1="0"
y1="0"
x2="0"
y2="100%"
spreadMethod="reflect"
>
<stop
offset="0"
stopColor={theme.legacy.GRADIENT_RED_START}
/>
<stop
offset="1"
stopColor={theme.legacy.GRADIENT_RED_END}
/>
</linearGradient>
</defs>

<defs>
<filter id="shadow" x="-2" y="-10" width="50" height="50">
<feGaussianBlur in="SourceAlpha" stdDeviation="5" />
Expand All @@ -305,7 +268,7 @@ export const TransactionsGraph = memo(
filter={isBarColored(index) ? 'url(#shadow)' : ''}
fill={
isBarColored(index)
? 'url(#greenGradient)'
? theme.baseBorderBrand
: '#aeaeae'
}
/>
Expand All @@ -322,7 +285,7 @@ export const TransactionsGraph = memo(
filter={isBarColored(index) ? 'url(#shadow)' : ''}
fill={
isBarColored(index)
? 'url(#redGradient)'
? theme.baseBorderNegative
: '#dfdfdf'
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Container = styled(motion.div)`
width: 100%;
padding: 12px 20px;
border-radius: 12px;
background: ${({ theme }) => theme.legacy.BG_GREEN};
background: ${({ theme }) => theme.baseFillSurfaceBrandDark};
overflow: hidden;
`;

Expand All @@ -52,7 +52,7 @@ const TextContainer = styled.div`
grid-column: 1/3;

* {
color: ${({ theme }) => theme.legacy.TYPE_WHITE};
color: ${({ theme }) => theme.baseContentPrimaryInverse};
}
`;

Expand All @@ -62,10 +62,6 @@ const OSIcons = styled.div`
align-items: center;
gap: 6px;
opacity: 0.7;

path {
fill: ${({ theme }) => theme.legacy.BG_WHITE};
}
`;

export const DesktopSuiteBanner = () => {
Expand Down Expand Up @@ -110,6 +106,7 @@ export const DesktopSuiteBanner = () => {
onClick={handleClose}
data-testid="@banner/install-desktop-suite/close-button"
size="small"
variant="tertiary"
/>
</Box>

Expand All @@ -128,7 +125,7 @@ export const DesktopSuiteBanner = () => {
</TextContainer>

<Button
variant="tertiary"
variant="primary"
href={href}
onClick={() =>
analytics.report({
Expand All @@ -140,9 +137,9 @@ export const DesktopSuiteBanner = () => {
</Button>

<OSIcons>
<Icon name="osMac" />
<Icon name="osLinux" />
<Icon name="osWindows" size={20} />
<Icon name="osMac" variant="primary" />
<Icon name="osLinux" variant="primary" />
<Icon name="osWindows" variant="primary" size={20} />
</OSIcons>
</Content>
</Container>
Expand Down
6 changes: 3 additions & 3 deletions packages/suite/src/views/view-only/ViewOnlyTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled, { useTheme } from 'styled-components';

import { Button, Icon, Text, Tooltip } from '@trezor/components';
import { borders, palette, spacingsPx, zIndices } from '@trezor/theme';
import { borders, paletteV1, spacingsPx, zIndices } from '@trezor/theme';

import { setFlag } from 'src/actions/suite/suiteActions';
import { Translation } from 'src/components/suite';
Expand All @@ -18,8 +18,8 @@ const Icons = styled.div`
`;

const IconContainer = styled.div`
border: solid 1px ${palette.lightWhiteAlpha400};
background-color: ${palette.darkGray300};
border: solid 1px ${paletteV1.lightWhiteAlpha400};
background-color: ${paletteV1.darkGray300};
border-radius: ${borders.radii.full};
padding: 4px;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export const CoinControl = ({ close }: CoinControlProps) => {
<Translation id="TR_PRIVATE_DESCRIPTION" values={{ targetAnonymity }} />
}
icon="shieldCheck"
iconColor={theme.legacy.BG_GREEN}
iconColor={theme.iconPrimaryDefault}
utxos={spendableUtxosOnPage}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
Text,
} from '@trezor/components';
import { variables } from '@trezor/components/src/config';
import { borders, palette, spacings, spacingsPx } from '@trezor/theme';
import { borders, paletteV1, spacings, spacingsPx } from '@trezor/theme';
import { TRADING_DOWNLOAD_INVITY_APP_URL } from '@trezor/urls';

import { Translation, TrezorLink } from 'src/components/suite';
Expand All @@ -31,7 +31,7 @@ const IconWrapper = styled.div`
width: 40px;
height: 40px;
border-radius: 50%;
background: ${palette.lightSecondaryLime500};
background: ${paletteV1.lightSecondaryLime500};
margin-right: ${spacingsPx.sm};
`;

Expand All @@ -55,9 +55,9 @@ const DCAColumn = styled.div`

const Column1 = styled(DCAColumn)`
gap: ${spacingsPx.xxl};
background-color: ${palette.lightPrimaryForest800};
background-color: ${paletteV1.lightPrimaryForest800};
border-radius: ${borders.radii.md};
color: ${palette.lightWhiteAlpha1000};
color: ${paletteV1.lightWhiteAlpha1000};
`;

const Column2 = styled(DCAColumn)`
Expand Down Expand Up @@ -88,14 +88,14 @@ interface FeatureItemProps {
const FeatureItem = ({ icon, featureNumber }: FeatureItemProps) => (
<Row>
<IconWrapper>
<Icon name={icon} size={20} color={palette.lightPrimaryForest800} />
<Icon name={icon} size={20} color={paletteV1.lightPrimaryForest800} />
</IconWrapper>
<div>
<Text typographyStyle="highlight" color={palette.lightSecondaryLime500}>
<Text typographyStyle="highlight" color={paletteV1.lightSecondaryLime500}>
<Translation id={`TR_TRADING_DCA_FEATURE_${featureNumber}_SUBHEADING`} />
</Text>
<Paragraph>
<Text color={palette.lightWhiteAlpha1000}>
<Text color={paletteV1.lightWhiteAlpha1000}>
<Translation id={`TR_TRADING_DCA_FEATURE_${featureNumber}_DESCRIPTION`} />
</Text>
</Paragraph>
Expand Down
Loading