- {variant === "mobileHeader" ? (
+
+ {type === "mobileHeader" ? (
diff --git a/components/LanguageSwitcher/languageSwitcher.module.css b/components/LanguageSwitcher/languageSwitcher.module.css
index 4f253bd4b..89ce55b56 100644
--- a/components/LanguageSwitcher/languageSwitcher.module.css
+++ b/components/LanguageSwitcher/languageSwitcher.module.css
@@ -1,13 +1,3 @@
-@keyframes slide-in {
- from {
- right: -100vw;
- }
-
- to {
- right: 0;
- }
-}
-
.button {
background-color: transparent;
color: var(--Base-Text-High-contrast);
@@ -25,7 +15,7 @@
.chevron {
justify-self: end;
- transition: transform 0.2s;
+ transition: transform 0.3s;
}
.chevron.isExpanded {
@@ -40,6 +30,7 @@
width: 100%;
background-color: var(--Base-Surface-Primary-light-Normal);
transition: right 0.3s;
+ z-index: var(--menu-overlay-z-index);
}
.dropdown.isExpanded {
@@ -47,82 +38,11 @@
right: 0;
}
-.backWrapper {
- background-color: var(--Base-Surface-Secondary-light-Normal);
- padding: var(--Spacing-x2);
-}
-
-.backButton {
- background-color: transparent;
- border: none;
- color: var(--Base-Text-High-contrast);
- font-family: var(--typography-Subtitle-1-fontFamily);
- font-weight: var(--typography-Subtitle-1-fontWeight);
- font-size: var(--typography-Subtitle-1-Mobile-fontSize);
- padding: 0;
- cursor: pointer;
- display: flex;
- align-items: center;
- gap: var(--Spacing-x1);
-}
-
-.languageWrapper {
- display: grid;
- gap: var(--Spacing-x3);
- padding: var(--Spacing-x3) var(--Spacing-x2);
-}
-
-.subtitle {
- font-family: var(--typography-Subtitle-2-fontFamily);
- font-size: var(--typography-Subtitle-2-Mobile-fontSize);
- font-weight: var(--typography-Subtitle-2-fontWeight);
- color: var(--Base-Text-High-contrast, #4d001b);
-}
-
-.list {
- list-style: none;
-}
-
-.link {
- color: var(--Scandic-Brand-Burgundy);
- font-family: var(--typography-Body-Regular-fontFamily);
- font-size: var(--typography-Body-Regular-fontSize);
- line-height: var(--typography-Body-Regular-lineHeight);
- letter-spacing: var(--typography-Body-Regular-letterSpacing);
- padding: var(--Spacing-x1);
- border-radius: var(--Corner-radius-Medium);
- display: flex;
- gap: var(--Spacing-x1);
- justify-content: space-between;
- align-items: center;
- text-decoration: none;
- border-radius: var(--Corner-radius-Medium);
-}
-
-.link.active,
-.link:hover {
- background-color: var(--Base-Surface-Primary-light-Hover-alt);
- font-weight: 600;
-}
-
@media screen and (min-width: 768px) {
.languageSwitcher {
position: relative;
}
- .backWrapper,
- .backButton {
- display: none;
- }
-
- .languageWrapper {
- padding: var(--Spacing-x2) var(--Spacing-x3);
- }
-
- .subtitle {
- display: none;
- }
-
.dropdown {
position: absolute;
top: 2.25rem;
@@ -153,8 +73,4 @@
font-size: var(--typography-Body-Bold-fontSize);
font-family: var(--typography-Body-Bold-fontFamily);
}
-
- .link.active:not(:hover) {
- background-color: transparent;
- }
}
diff --git a/components/LanguageSwitcher/variants.ts b/components/LanguageSwitcher/variants.ts
deleted file mode 100644
index 9338ea6d0..000000000
--- a/components/LanguageSwitcher/variants.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { cva } from "class-variance-authority"
-
-import styles from "./languageSwitcher.module.css"
-
-export const languageSwitcherVariants = cva(styles.languageSwitcher, {
- variants: {
- variant: {
- mobileHeader: styles.mobileHeader,
- mobileFooter: styles.mobileFooter,
- desktopHeader: styles.desktopHeader,
- desktopFooter: styles.desktopFooter,
- },
- },
- defaultVariants: {
- variant: "desktopHeader",
- },
-})
diff --git a/hooks/useTrapFocus.ts b/hooks/useTrapFocus.ts
index 767143105..b7d1311c8 100644
--- a/hooks/useTrapFocus.ts
+++ b/hooks/useTrapFocus.ts
@@ -45,7 +45,6 @@ export function useTrapFocus(opts?: OptionsType) {
const first = tabbableElements[0]
const last = tabbableElements[tabbableElements.length - 1]
- console.log(tabbableElements)
const currentActiveElement = document.activeElement
// Scope current tabs to current root element
if (isWithinCurrentElementScope([...tabbableElements, ref.current])) {
diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json
index 9f70d0bf6..926556906 100644
--- a/i18n/dictionaries/da.json
+++ b/i18n/dictionaries/da.json
@@ -87,8 +87,8 @@
"Level 7": "Niveau 7",
"Level up to unlock": "Stig i niveau for at låse op",
"Log in": "Log på",
- "Log in/Join": "Log på/Tilmeld dig",
"Log in here": "Log ind her",
+ "Log in/Join": "Log på/Tilmeld dig",
"Log out": "Log ud",
"Manage preferences": "Administrer præferencer",
"Meetings & Conferences": "Møder & Konferencer",
diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json
index 6c033883e..d365e7945 100644
--- a/i18n/dictionaries/de.json
+++ b/i18n/dictionaries/de.json
@@ -86,8 +86,8 @@
"Level 7": "Level 7",
"Level up to unlock": "Zum Freischalten aufsteigen",
"Log in": "Anmeldung",
- "Log in/Join": "Log in/Anmelden",
"Log in here": "Hier einloggen",
+ "Log in/Join": "Log in/Anmelden",
"Log out": "Ausloggen",
"Manage preferences": "Verwalten von Voreinstellungen",
"Membership ID copied to clipboard": "Mitglieds-ID in die Zwischenablage kopiert",
diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json
index cb68d3974..a35660b45 100644
--- a/i18n/dictionaries/en.json
+++ b/i18n/dictionaries/en.json
@@ -92,8 +92,8 @@
"Level 7": "Level 7",
"Level up to unlock": "Level up to unlock",
"Log in": "Log in",
- "Log in/Join": "Log in/Join",
"Log in here": "Log in here",
+ "Log in/Join": "Log in/Join",
"Log out": "Log out",
"Manage preferences": "Manage preferences",
"Meetings & Conferences": "Meetings & Conferences",
diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json
index 01f5677a1..b54da3963 100644
--- a/i18n/dictionaries/fi.json
+++ b/i18n/dictionaries/fi.json
@@ -86,8 +86,8 @@
"Level 6": "Taso 6",
"Level 7": "Taso 7",
"Log in": "Kirjaudu sisään",
- "Log in/Join": "Kirjaudu sisään/Liittyä",
"Log in here": "Kirjaudu sisään",
+ "Log in/Join": "Kirjaudu sisään/Liittyä",
"Log out": "Kirjaudu ulos",
"Manage preferences": "Asetusten hallinta",
"Meetings & Conferences": "Kokoukset & Konferenssit",
@@ -97,7 +97,7 @@
"Members": "Jäsenet",
"Membership cards": "Jäsenkortit",
"Membership ID": "Jäsentunnus",
- "Menu": "Menu",
+ "Menu": "Valikko",
"Modify": "Muokkaa",
"Month": "Kuukausi",
"My communication preferences": "Viestintämieltymykseni",
diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json
index 000517b33..abc05fc5c 100644
--- a/i18n/dictionaries/no.json
+++ b/i18n/dictionaries/no.json
@@ -45,9 +45,9 @@
"Could not find requested resource": "Kunne ikke finne den forespurte ressursen",
"Country": "Land",
"Country code": "Landskode",
- "Customer service": "Kundeservice",
"Credit card deleted successfully": "Kredittkort slettet",
"Current password": "Nåværende passord",
+ "Customer service": "Kundeservice",
"Date of Birth": "Fødselsdato",
"Day": "Dag",
"Description": "Beskrivelse",
@@ -87,8 +87,8 @@
"Level 7": "Nivå 7",
"Level up to unlock": "Nivå opp for å låse opp",
"Log in": "Logg Inn",
- "Log in/Join": "Logg på/Bli med",
"Log in here": "Logg inn her",
+ "Log in/Join": "Logg på/Bli med",
"Log out": "Logg ut",
"Manage preferences": "Administrer preferanser",
"Meetings & Conferences": "Møter & Konferanser",
diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json
index 490d65278..9634b8b2d 100644
--- a/i18n/dictionaries/sv.json
+++ b/i18n/dictionaries/sv.json
@@ -89,8 +89,8 @@
"Level 7": "Nivå 7",
"Level up to unlock": "Levla upp för att låsa upp",
"Log in": "Logga in",
- "Log in/Join": "Logga in/Gå med",
"Log in here": "Logga in här",
+ "Log in/Join": "Logga in/Gå med",
"Log out": "Logga ut",
"Manage preferences": "Hantera inställningar",
"Meetings & Conferences": "Möten & Konferenser",
@@ -106,8 +106,8 @@
"My communication preferences": "Mina kommunikationspreferenser",
"My membership cards": "Mina medlemskort",
"My pages": "Mina sidor",
- "My payment cards": "Mina betalningskort",
"My pages menu": "Mina sidor meny",
+ "My payment cards": "Mina betalningskort",
"My wishes": "Mina önskningar",
"New password": "Nytt lösenord",
"Next": "Nästa",
diff --git a/types/components/header/avatar.ts b/types/components/header/avatar.ts
index 1cb269879..a06a4d2f8 100644
--- a/types/components/header/avatar.ts
+++ b/types/components/header/avatar.ts
@@ -1,4 +1,4 @@
-import { ImageProps } from "next/image"
+import type { ImageProps } from "next/image"
export interface AvatarProps {
image?: ImageProps
diff --git a/types/components/header/headerLink.ts b/types/components/header/headerLink.ts
index 671ab6d0e..deb1c71ab 100644
--- a/types/components/header/headerLink.ts
+++ b/types/components/header/headerLink.ts
@@ -1,3 +1,3 @@
-import { LinkProps } from "@/components/TempDesignSystem/Link/link"
+import type { LinkProps } from "@/components/TempDesignSystem/Link/link"
export interface HeaderLinkProps extends React.PropsWithChildren
{}
diff --git a/types/components/header/languageSwitcher.ts b/types/components/header/languageSwitcher.ts
deleted file mode 100644
index 694e12b48..000000000
--- a/types/components/header/languageSwitcher.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { VariantProps } from "class-variance-authority"
-
-import { languageSwitcherVariants } from "@/components/LanguageSwitcher/variants"
-
-import { LanguageSwitcherData } from "@/types/requests/languageSwitcher"
-
-export interface LanguageSwitcherProps
- extends VariantProps {
- urls: LanguageSwitcherData
-}
diff --git a/types/components/header/mainMenu.ts b/types/components/header/mainMenu.ts
index a867be31b..34906bbd5 100644
--- a/types/components/header/mainMenu.ts
+++ b/types/components/header/mainMenu.ts
@@ -1,4 +1,4 @@
-import { LanguageSwitcherData } from "@/types/requests/languageSwitcher"
+import type { LanguageSwitcherData } from "@/types/requests/languageSwitcher"
export interface MainMenuProps {
languageUrls: LanguageSwitcherData
diff --git a/types/components/header/mobileMenu.ts b/types/components/header/mobileMenu.ts
index 79f11a563..aa43f1ab0 100644
--- a/types/components/header/mobileMenu.ts
+++ b/types/components/header/mobileMenu.ts
@@ -1,6 +1,6 @@
import { MainNavigationItem } from "./mainNavigationItem"
-import { LanguageSwitcherData } from "@/types/requests/languageSwitcher"
+import type { LanguageSwitcherData } from "@/types/requests/languageSwitcher"
export interface MobileMenuProps {
languageUrls: LanguageSwitcherData
diff --git a/types/components/header/myPagesMenu.ts b/types/components/header/myPagesMenu.ts
index 8397a9b08..34f925afd 100644
--- a/types/components/header/myPagesMenu.ts
+++ b/types/components/header/myPagesMenu.ts
@@ -1,6 +1,6 @@
import { navigationQueryRouter } from "@/server/routers/contentstack/myPages/navigation/query"
-import { User } from "@/types/user"
+import type { User } from "@/types/user"
type MyPagesNavigation = Awaited<
ReturnType<(typeof navigationQueryRouter)["get"]>
diff --git a/types/components/header/navigationMenu.ts b/types/components/header/navigationMenu.ts
index 11642b11f..c82b3a7ef 100644
--- a/types/components/header/navigationMenu.ts
+++ b/types/components/header/navigationMenu.ts
@@ -2,7 +2,7 @@ import { VariantProps } from "class-variance-authority"
import { navigationMenuVariants } from "@/components/Header/MainMenu/NavigationMenu/variants"
-import { MainNavigationItem } from "@/types/components/header/mainNavigationItem"
+import type { MainNavigationItem } from "@/types/components/header/mainNavigationItem"
export interface NavigationMenuProps
extends VariantProps {
diff --git a/types/components/header/navigationMenuItem.ts b/types/components/header/navigationMenuItem.ts
index 942b706c8..3794d1432 100644
--- a/types/components/header/navigationMenuItem.ts
+++ b/types/components/header/navigationMenuItem.ts
@@ -2,7 +2,7 @@ import { VariantProps } from "class-variance-authority"
import { navigationMenuItemVariants } from "@/components/Header/MainMenu/NavigationMenu/NavigationMenuItem/variants"
-import { MainNavigationItem } from "@/types/components/header/mainNavigationItem"
+import type { MainNavigationItem } from "@/types/components/header/mainNavigationItem"
export interface NavigationMenuItemProps
extends VariantProps {
diff --git a/types/components/header/topMenu.ts b/types/components/header/topMenu.ts
index 4e20a6e7f..b30cf64a0 100644
--- a/types/components/header/topMenu.ts
+++ b/types/components/header/topMenu.ts
@@ -1,4 +1,4 @@
-import { LanguageSwitcherData } from "@/types/requests/languageSwitcher"
+import type { LanguageSwitcherData } from "@/types/requests/languageSwitcher"
export interface TopMenuProps {
languageUrls: LanguageSwitcherData
diff --git a/types/components/languageSwitcher/languageSwitcher.ts b/types/components/languageSwitcher/languageSwitcher.ts
new file mode 100644
index 000000000..fbadfab5d
--- /dev/null
+++ b/types/components/languageSwitcher/languageSwitcher.ts
@@ -0,0 +1,6 @@
+import { LanguageSwitcherData } from "@/types/requests/languageSwitcher"
+
+export interface LanguageSwitcherProps {
+ type: "mobileHeader" | "mobileFooter" | "desktopHeader" | "desktopFooter"
+ urls: LanguageSwitcherData
+}
diff --git a/utils/tabbable.ts b/utils/tabbable.ts
index 30ebfbd9f..37dafb131 100644
--- a/utils/tabbable.ts
+++ b/utils/tabbable.ts
@@ -20,15 +20,6 @@ function hidesContents(element: HTMLElement) {
// Otherwise we need to check some styles
const style = window.getComputedStyle(element)
- console.log({
- element,
- zeroSize,
- display: style.display,
- overflow: style.overflow,
- returns:
- style.getPropertyValue("display") === "none" ||
- (zeroSize && style.getPropertyValue("overflow") !== "visible"),
- })
return (
style.getPropertyValue("display") === "none" ||
(zeroSize && style.getPropertyValue("overflow") !== "visible")