Skip to content
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

navbar buttons now have the correct hover color because there's no layout shift that causes the mouse to not be over the buttons.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,5 @@ test.each(['large' /* 'small' */])('MainNavigationBar inverse with %s menu in DE

const startButton = await screen.findByRole('button', {name: 'Start'});
await page.click(startButton);
await startButton.hover(); // Make sure menu is expanded
expect(await page.screenshot()).toMatchImageSnapshot({failureThreshold: 0.00002});
});
30 changes: 30 additions & 0 deletions src/logo-blau-shell.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import * as React from 'react';
import * as styles from './logo.css';
import {calcInlineVars} from './logo-common';
import {applyCssVars} from './utils/css';

import type {ByBreakpoint} from './utils/types';
import type {LogoType} from './logo-common';

type Props = {
size: ByBreakpoint<number>;
type: LogoType;
children: React.ReactNode;
};

const BlauLogoShell = ({size, type, children}: Props): JSX.Element => {
const viewBox = type === 'imagotype' ? '0 0 138 72' : type === 'vertical' ? '0 0 73 72' : '0 0 72 72';

return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox={viewBox}
role="presentation"
>
{children}
</svg>
);
};

export default BlauLogoShell;
41 changes: 7 additions & 34 deletions src/logo-blau.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
import * as React from 'react';
import * as styles from './logo.css';
import {getBlauSkin} from './skins/blau';
import {applyCssVars} from './utils/css';
import {calcInlineVars} from './logo-common';

import type {LogoImageProps} from './logo-common';

const BlauLogoImage = ({
size,
type,
isDarkMode,
themeVariant,
color: colorProp,
}: LogoImageProps): JSX.Element => {
const BlauLogoImage = ({type, isDarkMode, themeVariant, color: colorProp}: LogoImageProps): JSX.Element => {
const {colors} = getBlauSkin();
const color =
colorProp ||
Expand All @@ -39,48 +30,30 @@ const BlauLogoImage = ({

if (type === 'vertical') {
return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox="0 0 73 72"
fill={color}
role="presentation"
>
<g fill={color}>
<path d="M56.42 52.2003H18.2V63.0003H56.42V52.2003Z" fill={colorSecondary} />
<path d="M38.8069 36.431H35.0651V31.658H38.8069C40.7615 31.658 41.5432 32.865 41.5432 34.0171C41.5432 35.2789 40.7615 36.431 38.8069 36.431ZM35.121 19.0948H37.9132C40.6496 19.0948 40.4821 23.0447 37.9132 23.0447H35.121V19.0948ZM49.6963 26.2267C52.7119 25.1844 54.3312 22.3864 54.3871 19.369C54.5546 13.7182 50.0316 9 44.3355 9H18.2V19.0398H21.8859V36.7602H18.2V46.8H44.2237C50.925 46.8 56.1188 42.3013 56.3981 35.8276C56.6773 30.89 54.2756 27.9275 49.6963 26.2267Z" />
</svg>
</g>
);
}

if (type === 'imagotype') {
return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox="0 0 138 72"
fill={color}
role="presentation"
>
<g fill={color}>
<path d="M135.557 54.5729H6.16162V65.184H135.557V54.5729Z" fill={colorSecondary} />
<path d="M37.7269 25.9921C42.1878 27.7129 44.5575 30.6343 44.2869 35.6127C44.0163 42.0913 38.9696 46.5732 32.3623 46.5732H6.83155V36.5296H10.4229V18.8042H6.83155V8.75793H32.47C38.0579 8.75793 42.5215 13.5131 42.3507 19.1299C42.2929 22.1512 40.6877 24.9701 37.7269 25.9921ZM26.1359 17.9477H22.7942V23.2703H26.1359C29.4277 23.2703 29.6484 17.9477 26.1359 17.9477ZM30.3393 34.0259C30.3393 32.4812 29.3437 30.9443 27.0449 30.9443H22.7915V37.1076H27.0423C29.2806 37.1102 30.3393 35.5917 30.3393 34.0259Z" />
<path d="M45.2905 8.75794V18.8042H48.8477V46.5732H61.8442V8.75794H45.2905Z" />
<path d="M99.2576 46.5732H87.0676L86.7996 43.7674C84.8108 46.1975 81.8553 47.0592 79.0705 47.117C60.5884 47.3325 60.5884 16.6525 79.0705 16.8627C81.8553 16.8627 84.8108 17.727 86.7996 20.1572L87.0676 17.3435H99.2576V46.5732ZM86.3188 31.9846C86.3188 26.3126 78.3191 26.3704 78.3191 31.9846C78.3191 37.6067 86.3188 37.6619 86.3188 31.9846Z" />
<path d="M134.858 17.3435H121.972V33.1222C121.972 35.2844 120.359 36.309 118.748 36.309C117.13 36.309 115.843 35.2345 115.843 33.1774V17.3435H102.949V33.2378C102.949 41.072 106.009 46.9043 114.661 47.1171C117.506 47.1696 120.467 46.2501 122.5 43.6571L122.773 46.5733L134.861 46.5917L134.858 17.3435Z" />
</svg>
</g>
);
}

return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox="0 0 72 72"
fill={color}
role="presentation"
>
<g fill={color}>
<path d="M55.8 52.2003H18V63.0003H55.8V52.2003Z" fill={colorSecondary} />
<path d="M38.3805 36.431H34.6798V31.658H38.3805C40.3136 31.658 41.0868 32.865 41.0868 34.0171C41.0868 35.2789 40.3136 36.431 38.3805 36.431ZM34.7351 19.0948H37.4966C40.2029 19.0948 40.0373 23.0447 37.4966 23.0447H34.7351V19.0948ZM49.1503 26.2267C52.1327 25.1844 53.7342 22.3864 53.7895 19.369C53.9552 13.7182 49.4819 9 43.8483 9H18V19.0398H21.6454V36.7602H18V46.8H43.7377C50.3654 46.8 55.5022 42.3013 55.7784 35.8276C56.0545 30.89 53.6792 27.9275 49.1503 26.2267Z" />
</svg>
</g>
);
};

Expand Down
1 change: 0 additions & 1 deletion src/logo-common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {ByBreakpoint} from './utils/types';
export type LogoType = 'isotype' | 'imagotype' | 'vertical';

export type LogoImageProps = {
size: ByBreakpoint<number>;
type: LogoType;
isDarkMode: boolean;
themeVariant: NonDeprecatedVariant;
Expand Down
30 changes: 30 additions & 0 deletions src/logo-esimflag-shell.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import * as React from 'react';
import * as styles from './logo.css';
import {calcInlineVars} from './logo-common';
import {applyCssVars} from './utils/css';

import type {LogoType} from './logo-common';
import type {ByBreakpoint} from './utils/types';

type Props = {
size: ByBreakpoint<number>;
type: LogoType;
children: React.ReactNode;
};

const EsimflagLogoShell = ({size, type, children}: Props): JSX.Element => {
const viewBox = type === 'imagotype' ? '0 0 195 72' : '0 0 72 72';

return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox={viewBox}
role="presentation"
>
{children}
</svg>
);
};

export default EsimflagLogoShell;
34 changes: 6 additions & 28 deletions src/logo-esimflag.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import * as React from 'react';
import * as styles from './logo.css';
import {getEsimflagSkin} from './skins/esimflag';
import {applyCssVars} from './utils/css';
import {calcInlineVars} from './logo-common';

import type {LogoImageProps} from './logo-common';

const EsimflagLogoImage = ({
size,
type,
isDarkMode,
themeVariant,
Expand All @@ -28,27 +24,15 @@ const EsimflagLogoImage = ({

if (type === 'vertical') {
return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox="0 0 72 72"
fill={color}
role="presentation"
>
<g fill={color}>
<path d="M9.33603 12H50.819C51.9502 12 53.0447 12.4078 53.8875 13.1485L65.0953 22.9663C66.0739 23.8235 66.6338 25.0497 66.6338 26.3369V58.7085C66.6338 59.9736 65.5874 61 64.2978 61H9.33603C8.04641 61 7 59.9736 7 58.7085V14.2915C7 13.0264 8.04641 12 9.33603 12ZM42.3148 32.8561L57.779 32.8867V32.8894L59.1167 25.5518L40.6038 25.5157C41.687 27.674 42.312 30.1818 42.312 32.8589L26.5735 32.8284L28.0469 25.4824L40.6038 25.5074C38.3978 21.1131 34.2631 18.1531 29.5232 18.1448L24.3307 18.1337C22.9082 18.1281 21.6893 19.1046 21.415 20.4695L14.5228 54.858L19.7266 54.8691C21.1378 54.8719 22.3511 53.8954 22.6254 52.536L25.1113 40.1688L43.9919 40.2077C42.9228 38.0549 42.3091 35.5554 42.3148 32.8867V32.8561ZM56.4498 40.2326L43.9947 40.2077C44.5575 41.3423 45.2504 42.3909 46.0507 43.3036C48.1153 45.6894 50.8868 47.2651 53.978 47.5786H55.1121L56.4498 40.2326Z" />
</svg>
</g>
);
}

if (type === 'imagotype') {
return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox="0 0 195 72"
fill={color}
role="presentation"
>
<g fill={color}>
<path d="M9.33603 11H50.819C51.9502 11 53.0447 11.4078 53.8875 12.1485L65.0953 21.9663C66.0739 22.8235 66.6338 24.0497 66.6338 25.3369V57.7085C66.6338 58.9736 65.5874 60 64.2978 60H9.33603C8.04641 60 7 58.9736 7 57.7085V13.2915C7 12.0264 8.04641 11 9.33603 11ZM42.3148 31.8561L57.779 31.8867V31.8894L59.1167 24.5518L40.6038 24.5157C41.687 26.674 42.312 29.1818 42.312 31.8589L26.5735 31.8284L28.0469 24.4824L40.6038 24.5074C38.3978 20.1131 34.2631 17.1531 29.5232 17.1448L24.3307 17.1337C22.9082 17.1281 21.6893 18.1046 21.415 19.4695L14.5228 53.858L19.7266 53.8691C21.1378 53.8719 22.3511 52.8954 22.6254 51.536L25.1113 39.1688L43.9919 39.2077C42.9228 37.0549 42.3091 34.5554 42.3148 31.8867V31.8561ZM56.4498 39.2326L43.9947 39.2077C44.5575 40.3423 45.2504 41.3909 46.0507 42.3036C48.1153 44.6894 50.8868 46.2651 53.978 46.5786H55.1121L56.4498 39.2326Z" />
<path d="M94.6351 24.4047C94.0638 24.3354 93.5831 24.2494 93.1956 24.1467C92.8704 24.058 92.6413 23.9442 92.5055 23.8028C92.3698 23.664 92.3019 23.4671 92.3019 23.2119V21.8192C92.9382 21.9968 93.6085 22.1438 94.3155 22.2575C95.0226 22.3713 95.6419 22.4295 96.1736 22.4295C97.0673 22.4295 97.7319 22.2686 98.1674 21.9441C98.6001 21.6195 98.8179 21.1895 98.8179 20.6569C98.8179 20.3378 98.7274 20.0604 98.5464 19.8163C98.3654 19.5749 98.0996 19.3585 97.7489 19.1671C97.3982 18.9757 96.9259 18.7732 96.3292 18.5568L95.5316 18.2711C94.4428 17.8771 93.6113 17.4 93.0429 16.8396C92.4716 16.2792 92.186 15.5496 92.186 14.6452C92.186 13.8685 92.3868 13.2082 92.7884 12.6617C93.19 12.1152 93.7669 11.7019 94.5192 11.4217C95.2714 11.1415 96.1651 11.0028 97.2031 11.0028C97.6951 11.0028 98.1844 11.0305 98.6709 11.0888C99.1573 11.147 99.5759 11.2192 99.9265 11.3079C100.147 11.3579 100.317 11.4161 100.433 11.4799C100.549 11.5437 100.631 11.6297 100.676 11.7379C100.721 11.8461 100.744 11.9959 100.744 12.1873V13.5051C100.252 13.3775 99.6975 13.272 99.0809 13.1916C98.4644 13.1084 97.9242 13.0668 97.4576 13.0668C96.6403 13.0668 96.0039 13.1888 95.5514 13.4302C95.0961 13.6715 94.8699 14.046 94.8699 14.5565C94.8699 14.9643 95.0537 15.2972 95.4242 15.5579C95.7946 15.8187 96.3348 16.0767 97.0475 16.3319L97.8252 16.6371C98.6426 16.9312 99.3128 17.2474 99.8389 17.5914C100.365 17.9354 100.772 18.3543 101.063 18.8509C101.355 19.3475 101.502 19.9439 101.502 20.6458C101.502 21.4475 101.301 22.1383 100.899 22.7153C100.498 23.2951 99.9067 23.7389 99.129 24.0497C98.3513 24.3604 97.418 24.5185 96.3263 24.5185C95.7692 24.5185 95.2036 24.4824 94.6351 24.4131V24.4047Z" />
<path d="M90.4523 19.672H82.6269C82.7174 20.5709 83.0681 21.2394 83.679 21.6805C84.2898 22.1216 85.0902 22.3435 86.0829 22.3435C87.0755 22.3435 88.286 22.1188 89.6293 21.6694V23.1508C89.6293 23.345 89.5841 23.5087 89.4908 23.6446C89.4003 23.7806 89.1995 23.9054 88.8969 24.0275C88.5009 24.1634 88.0088 24.2771 87.4206 24.3742C86.8323 24.4713 86.2497 24.5213 85.67 24.5213C84.5246 24.5213 83.4951 24.2993 82.5816 23.8582C81.6653 23.4171 80.9442 22.7708 80.4181 21.9163C79.8921 21.0619 79.6291 20.0604 79.6291 18.9091C79.6291 17.7579 79.8667 16.7952 80.339 15.9352C80.8113 15.0752 81.4645 14.4094 82.296 13.9378C83.1275 13.4662 84.0692 13.2304 85.1213 13.2304C86.1734 13.2304 87.0897 13.4662 87.9127 13.9378C88.7357 14.4094 89.3805 15.0614 89.8471 15.8908C90.3109 16.7203 90.5457 17.6746 90.5457 18.7538C90.5457 19.0673 90.5145 19.3752 90.4551 19.6748L90.4523 19.672ZM83.4612 15.9352C83.0115 16.3319 82.74 16.9201 82.6495 17.6968H87.6157C87.5394 16.9339 87.2679 16.3486 86.804 15.9463C86.3374 15.5413 85.7774 15.3416 85.1213 15.3416C84.4652 15.3416 83.9109 15.5413 83.4612 15.9352Z" />
Expand All @@ -58,20 +42,14 @@ const EsimflagLogoImage = ({
<path d="M105.218 31.415C105.218 30.7742 105.388 30.2832 105.73 29.9475C106.072 29.6118 106.57 29.4454 107.226 29.4454H111.511V54.8345H124.808V59.5617H105.218V31.415Z" />
<path d="M156.537 58.3355C156.537 58.1025 156.495 57.8556 156.404 57.592V57.5893L146.141 29.4426H140.519C139.806 29.4426 139.286 29.5675 138.957 29.8144C138.629 30.0613 138.347 30.4913 138.109 31.1043L128.247 59.5589H134.362L136.279 53.7359H148.55L150.513 59.5589H154.976C155.479 59.5589 155.867 59.4479 156.136 59.2316C156.404 59.0152 156.537 58.7156 156.537 58.3355ZM137.795 49.1003L142.391 35.224L147.032 49.1003H137.795Z" />
<path d="M188 41.9652V57.5476C186.453 58.2772 184.623 58.8681 182.511 59.3203C180.398 59.7725 178.181 60 175.862 60C172.261 60 169.196 59.3814 166.667 58.1385C164.139 56.8985 162.227 55.1258 160.932 52.8205C159.637 50.5151 158.992 47.7854 158.992 44.6339C158.992 41.4825 159.685 38.5557 161.068 36.206C162.451 33.8563 164.43 32.0698 167.004 30.8436C169.578 29.6174 172.621 29.0043 176.13 29.0043C177.618 29.0043 179.032 29.0931 180.37 29.2678C181.707 29.4426 182.839 29.6757 183.761 29.9669C184.504 30.2 184.994 30.4774 185.234 30.7992C185.472 31.121 185.59 31.5593 185.59 32.1114V35.3516C183.984 34.9133 182.437 34.5942 180.949 34.3889C179.462 34.1864 178.107 34.0838 176.888 34.0838C173.138 34.0838 170.285 34.966 168.319 36.7331C166.356 38.5003 165.372 41.0442 165.372 44.3732C165.372 47.8741 166.294 50.5096 168.138 52.274C169.982 54.0411 172.615 54.9233 176.037 54.9233C178.715 54.9233 180.737 54.6597 182.106 54.1354V46.6951H175.279V43.6741C175.279 43.1192 175.426 42.6976 175.726 42.4035C176.023 42.1122 176.456 41.9652 177.021 41.9652H188Z" />
</svg>
</g>
);
}

return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox="0 0 72 72"
fill={color}
role="presentation"
>
<g fill={color}>
<path d="M9.33603 12H50.819C51.9502 12 53.0447 12.4078 53.8875 13.1485L65.0953 22.9663C66.0739 23.8235 66.6338 25.0497 66.6338 26.3369V58.7085C66.6338 59.9736 65.5874 61 64.2978 61H9.33603C8.04641 61 7 59.9736 7 58.7085V14.2915C7 13.0264 8.04641 12 9.33603 12ZM42.3148 32.8561L57.779 32.8867V32.8894L59.1167 25.5518L40.6038 25.5157C41.687 27.674 42.312 30.1818 42.312 32.8589L26.5735 32.8284L28.0469 25.4824L40.6038 25.5074C38.3978 21.1131 34.2631 18.1531 29.5232 18.1448L24.3307 18.1337C22.9082 18.1281 21.6893 19.1046 21.415 20.4695L14.5228 54.858L19.7266 54.8691C21.1378 54.8719 22.3511 53.8954 22.6254 52.536L25.1113 40.1688L43.9919 40.2077C42.9228 38.0549 42.3091 35.5554 42.3148 32.8867V32.8561ZM56.4498 40.2326L43.9947 40.2077C44.5575 41.3423 45.2504 42.3909 46.0507 43.3036C48.1153 45.6894 50.8868 47.2651 53.978 47.5786H55.1121L56.4498 40.2326Z" />
</svg>
</g>
);
};

Expand Down
30 changes: 30 additions & 0 deletions src/logo-movistar-new-shell.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import * as React from 'react';
import * as styles from './logo.css';
import {calcInlineVars} from './logo-common';
import {applyCssVars} from './utils/css';

import type {LogoType} from './logo-common';
import type {ByBreakpoint} from './utils/types';

type Props = {
size: ByBreakpoint<number>;
type: LogoType;
children: React.ReactNode;
};

const MovistarNewLogoShell = ({size, type, children}: Props): JSX.Element => {
const viewBox = type === 'imagotype' ? '0 0 203 72' : '0 0 72 72';

return (
<svg
className={styles.svg}
style={applyCssVars(calcInlineVars(size))}
viewBox={viewBox}
role="presentation"
>
{children}
</svg>
);
};

export default MovistarNewLogoShell;
Loading
Loading