feat(SW-375): consume new tokens in scandic-web

This commit is contained in:
Michael Zetterberg
2025-03-02 08:12:27 +01:00
parent 56973888c9
commit 6232ded991
27 changed files with 68 additions and 147 deletions

View File

@@ -1,4 +1,6 @@
import "@scandic-hotels/design-system/fonts.css"
import "@/app/globals.css"
import "@/public/_static/css/design-system-new-deprecated.css"
import "@scandic-hotels/design-system/style.css"
import { ReactQueryDevtools } from "@tanstack/react-query-devtools"
@@ -49,7 +51,7 @@ export default async function RootLayout({
window.adobeDataLayer = window.adobeDataLayer || []
`}</Script>
</head>
<body>
<body className="scandic">
<SessionProvider basePath="/api/web/auth">
<ServerIntlProvider intl={{ defaultLocale, locale, messages }}>
<TrpcProvider>

View File

@@ -1,4 +1,6 @@
import "@scandic-hotels/design-system/fonts.css"
import "@/app/globals.css"
import "@/public/_static/css/design-system-current-deprecated.css"
import "@scandic-hotels/design-system/style.css"
import Script from "next/script"

View File

@@ -1,4 +1,6 @@
import "@scandic-hotels/design-system/fonts.css"
import "@/app/globals.css"
import "@/public/_static/css/design-system-new-deprecated.css"
import "@scandic-hotels/design-system/style.css"
import { ReactQueryDevtools } from "@tanstack/react-query-devtools"

View File

@@ -1,4 +1,6 @@
import "@scandic-hotels/design-system/fonts.css"
import "@/app/globals.css"
import "@/public/_static/css/design-system-new-deprecated.css"
import "@scandic-hotels/design-system/style.css"
import Script from "next/script"

View File

@@ -1,101 +1,3 @@
@font-face {
font-display: fallback;
font-family: "biro script plus";
font-style: normal;
font-weight: 400;
src: url(/_static/fonts/biro-script-plus/regular.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "brandon text";
font-weight: 700;
src:
url(/_static/fonts/brandon-text/bold.woff2) format("woff2"),
url(/_static/fonts/brandon-text/bold.woff) format("woff");
}
@font-face {
font-display: fallback;
font-family: "brandon text";
font-weight: 900;
src:
url(/_static/fonts/brandon-text/black.woff2) format("woff2"),
url(/_static/fonts/brandon-text/black.woff) format("woff");
}
@font-face {
font-display: fallback;
font-family: "fira mono";
font-style: normal;
font-weight: 400;
src: url(/_static/fonts/fira-mono/regular.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "fira mono";
font-style: normal;
font-weight: 500;
src: url(/_static/fonts/fira-mono/medium.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "fira mono";
font-style: normal;
font-weight: 700;
src: url(/_static/fonts/fira-mono/bold.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "fira sans";
font-style: normal;
font-weight: 300;
src: url(/_static/fonts/fira-sans/light.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "fira sans";
font-style: normal;
font-weight: 400;
src: url(/_static/fonts/fira-sans/regular.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "fira sans";
font-style: normal;
font-weight: 500;
src: url(/_static/fonts/fira-sans/medium.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "fira sans";
font-style: normal;
font-weight: 600;
src: url(/_static/fonts/fira-sans/semibold.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "fira sans";
font-style: normal;
font-weight: 700;
src: url(/_static/fonts/fira-sans/bold.woff2) format("woff2");
}
@font-face {
font-display: fallback;
font-family: "fira sans";
font-style: normal;
font-weight: 900;
src: url(/_static/fonts/fira-sans/black.woff2) format("woff2");
}
:root {
--current-max-width: 113.5rem;

View File

@@ -1,9 +1,10 @@
import { Typography } from "@scandic-hotels/design-system/Typography"
import { ChevronRightSmallIcon, TripAdvisorIcon } from "@/components/Icons"
import Link from "@/components/TempDesignSystem/Link"
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
import Body from "@/components/TempDesignSystem/Text/Body"
import Preamble from "@/components/TempDesignSystem/Text/Preamble"
import Title from "@/components/TempDesignSystem/Text/Title"
import { getIntl } from "@/i18n"
import { getSingleDecimal } from "@/utils/numberFormatting"
@@ -47,7 +48,9 @@ export default async function IntroSection({
<BiroScript tilted="medium" color="red">
{intl.formatMessage({ id: "Welcome to" })}
</BiroScript>
<Title level="h2">{hotelName}</Title>
<Typography variant="Title/lg">
<h1>{hotelName}</h1>
</Typography>
</div>
<Body color="uiTextMediumContrast">{formattedLocationText}</Body>
{hasTripAdvisorData && (

View File

@@ -1,11 +1,10 @@
"use client"
import { useRouter } from "next/navigation"
import { Button } from "@scandic-hotels/design-system/current"
import { renderOptions as currentRenderOptions } from "@/components/Current/currentRenderOptions"
import DeprecatedJsonToHtml from "@/components/DeprecatedJsonToHtml"
import Image from "@/components/Image"
import Button from "@/components/TempDesignSystem/Button"
import { renderOptions } from "./renderOptions"

View File

@@ -1,6 +1,6 @@
"use client"
import "@scandic-hotels/design-system/current/style.css"
import "@/public/_static/css/design-system-current-deprecated.css"
import { useIntl } from "react-intl"

View File

@@ -1,6 +1,3 @@
import "@/app/globals.css"
import "@scandic-hotels/design-system/style.css"
import { overview } from "@/constants/routes/webviews"
import { serverClient } from "@/lib/trpc/server"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1424,7 +1424,7 @@ export const hotelQueryRouter = router({
error: validatedMeetingRooms.error,
})
)
throw badRequestError()
return []
}
metrics.meetingRooms.success.add(1, {
hotelId,

View File

@@ -3,7 +3,7 @@
font-family: 'biro script plus';
font-style: normal;
font-weight: 400;
src: url(/fonts/biro-script-plus/regular.woff2) format('woff2');
src: url(/_static/fonts/biro-script-plus/regular.woff2) format('woff2');
}
@font-face {
@@ -11,8 +11,8 @@
font-family: 'brandon text';
font-weight: 700;
src:
url(/fonts/brandon-text/bold.woff2) format('woff2'),
url(/fonts/brandon-text/bold.woff) format('woff');
url(/_static/fonts/brandon-text/bold.woff2) format('woff2'),
url(/_static/fonts/brandon-text/bold.woff) format('woff');
}
@font-face {
@@ -20,8 +20,8 @@
font-family: 'brandon text';
font-weight: 900;
src:
url(/fonts/brandon-text/black.woff2) format('woff2'),
url(/fonts/brandon-text/black.woff) format('woff');
url(/_static/fonts/brandon-text/black.woff2) format('woff2'),
url(/_static/fonts/brandon-text/black.woff) format('woff');
}
@font-face {
@@ -30,8 +30,10 @@
font-style: normal;
font-weight: 300;
src:
url(/fonts/domaine/domainesanstextweb-light-webfont.woff2) format('woff2'),
url(/fonts/domaine/domainesanstextweb-light-webfont.woff) format('woff');
url(/_static/fonts/domaine/domainesanstextweb-light-webfont.woff2)
format('woff2'),
url(/_static/fonts/domaine/domainesanstextweb-light-webfont.woff)
format('woff');
}
@font-face {
@@ -40,8 +42,10 @@
font-style: normal;
font-weight: 400;
src:
url(/fonts/domaine/domainesanstextweb-regular-webfont.woff2) format('woff2'),
url(/fonts/domaine/domainesanstextweb-regular-webfont.woff) format('woff');
url(/_static/fonts/domaine/domainesanstextweb-regular-webfont.woff2)
format('woff2'),
url(/_static/fonts/domaine/domainesanstextweb-regular-webfont.woff)
format('woff');
}
@font-face {
@@ -49,7 +53,7 @@
font-family: 'fira sans';
font-style: normal;
font-weight: 300;
src: url(/fonts/fira-sans/light.woff2) format('woff2');
src: url(/_static/fonts/fira-sans/light.woff2) format('woff2');
}
@font-face {
@@ -57,7 +61,7 @@
font-family: 'fira sans';
font-style: normal;
font-weight: 400;
src: url(/fonts/fira-sans/regular.woff2) format('woff2');
src: url(/_static/fonts/fira-sans/regular.woff2) format('woff2');
}
@font-face {
@@ -65,7 +69,7 @@
font-family: 'fira sans';
font-style: normal;
font-weight: 500;
src: url(/fonts/fira-sans/medium.woff2) format('woff2');
src: url(/_static/fonts/fira-sans/medium.woff2) format('woff2');
}
@font-face {
@@ -73,7 +77,7 @@
font-family: 'fira sans';
font-style: normal;
font-weight: 600;
src: url(/fonts/fira-sans/semibold.woff2) format('woff2');
src: url(/_static/fonts/fira-sans/semibold.woff2) format('woff2');
}
@font-face {
@@ -81,7 +85,7 @@
font-family: 'fira sans';
font-style: normal;
font-weight: 700;
src: url(/fonts/fira-sans/bold.woff2) format('woff2');
src: url(/_static/fonts/fira-sans/bold.woff2) format('woff2');
}
@font-face {
@@ -89,7 +93,7 @@
font-family: 'fira sans';
font-style: normal;
font-weight: 900;
src: url(/fonts/fira-sans/black.woff2) format('woff2');
src: url(/_static/fonts/fira-sans/black.woff2) format('woff2');
}
@font-face {
@@ -98,9 +102,9 @@
font-style: normal;
font-weight: 400;
src:
url(/fonts/itcgaramond/ITCGaramondBookNarrow_normal_condensed.woff2)
url(/_static/fonts/itcgaramond/ITCGaramondBookNarrow_normal_condensed.woff2)
format('woff2'),
url(/fonts/itcgaramond/ITCGaramondBookNarrow_normal_condensed.woff)
url(/_static/fonts/itcgaramond/ITCGaramondBookNarrow_normal_condensed.woff)
format('woff');
}
@@ -110,8 +114,8 @@
font-style: normal;
font-weight: 900;
src:
url(/fonts/gotham/gotham-black-webfont.woff2) format('woff2'),
url(/fonts/gotham/gotham-black-webfont.woff) format('woff');
url(/_static/fonts/gotham/gotham-black-webfont.woff2) format('woff2'),
url(/_static/fonts/gotham/gotham-black-webfont.woff) format('woff');
}
@font-face {
@@ -120,8 +124,8 @@
font-style: normal;
font-weight: 700;
src:
url(/fonts/gotham/gotham-bold-webfont.woff2) format('woff2'),
url(/fonts/gotham/gotham-bold-webfont.woff) format('woff');
url(/_static/fonts/gotham/gotham-bold-webfont.woff2) format('woff2'),
url(/_static/fonts/gotham/gotham-bold-webfont.woff) format('woff');
}
@font-face {
@@ -130,9 +134,9 @@
font-style: normal;
font-weight: 400;
src:
url(/fonts/grotesk/NeueHaasGroteskDisplay55Roman_normal_normal.woff2)
url(/_static/fonts/grotesk/NeueHaasGroteskDisplay55Roman_normal_normal.woff2)
format('woff2'),
url(/fonts/grotesk/NeueHaasGroteskDisplay55Roman_normal_normal.woff)
url(/_static/fonts/grotesk/NeueHaasGroteskDisplay55Roman_normal_normal.woff)
format('woff');
}
@@ -142,9 +146,9 @@
font-style: normal;
font-weight: 500;
src:
url(/fonts/grotesk/NeueHaasGroteskDisplay65Medium_normal_normal.woff2)
url(/_static/fonts/grotesk/NeueHaasGroteskDisplay65Medium_normal_normal.woff2)
format('woff2'),
url(/fonts/grotesk/NeueHaasGroteskDisplay65Medium_normal_normal.woff)
url(/_static/fonts/grotesk/NeueHaasGroteskDisplay65Medium_normal_normal.woff)
format('woff');
}
@@ -154,8 +158,8 @@
font-style: normal;
font-weight: 300;
src:
url(/fonts/prumo/prumotext-light-webfont.woff2) format('woff2'),
url(/fonts/prumo/PrumoText-Light.woff) format('woff');
url(/_static/fonts/prumo/prumotext-light-webfont.woff2) format('woff2'),
url(/_static/fonts/prumo/PrumoText-Light.woff) format('woff');
}
@font-face {
@@ -163,7 +167,7 @@
font-family: 'Canela Deck';
font-style: normal;
font-weight: 900;
src: url(/fonts/canela-deck/CanelaDeck-Black.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-Black.otf) format('opentype');
}
@font-face {
@@ -171,7 +175,8 @@
font-family: 'Canela Deck';
font-style: italic;
font-weight: 900;
src: url(/fonts/canela-deck/CanelaDeck-BlackItalic.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-BlackItalic.otf)
format('opentype');
}
@font-face {
@@ -179,7 +184,7 @@
font-family: 'Canela Deck';
font-style: normal;
font-weight: 700;
src: url(/fonts/canela-deck/CanelaDeck-Bold.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-Bold.otf) format('opentype');
}
@font-face {
@@ -187,7 +192,8 @@
font-family: 'Canela Deck';
font-style: italic;
font-weight: 700;
src: url(/fonts/canela-deck/CanelaDeck-BoldItalic.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-BoldItalic.otf)
format('opentype');
}
@font-face {
@@ -195,7 +201,7 @@
font-family: 'Canela Deck';
font-style: normal;
font-weight: 300;
src: url(/fonts/canela-deck/CanelaDeck-Light.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-Light.otf) format('opentype');
}
@font-face {
@@ -203,7 +209,8 @@
font-family: 'Canela Deck';
font-style: italic;
font-weight: 300;
src: url(/fonts/canela-deck/CanelaDeck-LightItalic.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-LightItalic.otf)
format('opentype');
}
@font-face {
@@ -211,7 +218,7 @@
font-family: 'Canela Deck';
font-style: normal;
font-weight: 500;
src: url(/fonts/canela-deck/CanelaDeck-Medium.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-Medium.otf) format('opentype');
}
@font-face {
@@ -219,7 +226,8 @@
font-family: 'Canela Deck';
font-style: italic;
font-weight: 500;
src: url(/fonts/canela-deck/CanelaDeck-MediumItalic.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-MediumItalic.otf)
format('opentype');
}
@font-face {
@@ -227,7 +235,7 @@
font-family: 'Canela Deck';
font-style: normal;
font-weight: 400;
src: url(/fonts/canela-deck/CanelaDeck-Regular.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-Regular.otf) format('opentype');
}
@font-face {
@@ -235,7 +243,8 @@
font-family: 'Canela Deck';
font-style: italic;
font-weight: 400;
src: url(/fonts/canela-deck/CanelaDeck-RegularItalic.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-RegularItalic.otf)
format('opentype');
}
@font-face {
@@ -243,7 +252,7 @@
font-family: 'Canela Deck';
font-style: normal;
font-weight: 200;
src: url(/fonts/canela-deck/CanelaDeck-Thin.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-Thin.otf) format('opentype');
}
@font-face {
@@ -251,5 +260,6 @@
font-family: 'Canela Deck';
font-style: italic;
font-weight: 200;
src: url(/fonts/canela-deck/CanelaDeck-ThinItalic.otf) format('opentype');
src: url(/_static/fonts/canela-deck/CanelaDeck-ThinItalic.otf)
format('opentype');
}