+
-
)
}
diff --git a/components/Forms/BookingWidget/variants.ts b/components/Forms/BookingWidget/variants.ts
new file mode 100644
index 000000000..d31fd9643
--- /dev/null
+++ b/components/Forms/BookingWidget/variants.ts
@@ -0,0 +1,15 @@
+import { cva } from "class-variance-authority"
+
+import styles from "./form.module.css"
+
+export const bookingWidgetVariants = cva(styles.section, {
+ variants: {
+ type: {
+ default: styles.default,
+ full: styles.full,
+ },
+ },
+ defaultVariants: {
+ type: "full",
+ },
+})
diff --git a/components/TempDesignSystem/TeaserCard/index.tsx b/components/TempDesignSystem/TeaserCard/index.tsx
index a51c04eed..a441a3322 100644
--- a/components/TempDesignSystem/TeaserCard/index.tsx
+++ b/components/TempDesignSystem/TeaserCard/index.tsx
@@ -1,5 +1,3 @@
-import React from "react"
-
import { ChevronRightIcon } from "@/components/Icons"
import Image from "@/components/Image"
import Button from "@/components/TempDesignSystem/Button"
diff --git a/components/TempDesignSystem/Text/Caption/caption.module.css b/components/TempDesignSystem/Text/Caption/caption.module.css
index a7b51bb52..a3ac8919c 100644
--- a/components/TempDesignSystem/Text/Caption/caption.module.css
+++ b/components/TempDesignSystem/Text/Caption/caption.module.css
@@ -75,10 +75,14 @@ p.caption {
color: var(--UI-Text-High-contrast);
}
+.disabled {
+ color: var(--Base-Text-Disabled);
+}
+
.center {
text-align: center;
}
.left {
text-align: left;
-}
\ No newline at end of file
+}
diff --git a/components/TempDesignSystem/Text/Caption/variants.ts b/components/TempDesignSystem/Text/Caption/variants.ts
index 401893857..3b84c513e 100644
--- a/components/TempDesignSystem/Text/Caption/variants.ts
+++ b/components/TempDesignSystem/Text/Caption/variants.ts
@@ -15,6 +15,7 @@ const config = {
uiTextHighContrast: styles.uiTextHighContrast,
uiTextActive: styles.uiTextActive,
uiTextMediumContrast: styles.uiTextMediumContrast,
+ disabled: styles.disabled,
},
textTransform: {
bold: styles.bold,
diff --git a/components/TempDesignSystem/Tooltip/index.tsx b/components/TempDesignSystem/Tooltip/index.tsx
new file mode 100644
index 000000000..ba53c022d
--- /dev/null
+++ b/components/TempDesignSystem/Tooltip/index.tsx
@@ -0,0 +1,32 @@
+import { PropsWithChildren } from "react"
+
+import Caption from "@/components/TempDesignSystem/Text/Caption"
+
+import { tooltipVariants } from "./variants"
+
+import styles from "./tooltip.module.css"
+
+import { TooltipPosition, TooltipProps } from "@/types/components/tooltip"
+
+export function Tooltip({
+ heading,
+ text,
+ position,
+ arrow,
+ children,
+}: PropsWithChildren>) {
+ const className = tooltipVariants({ position, arrow })
+ return (
+
+
+ {heading && (
+
+ {heading}
+
+ )}
+ {text && {text}}
+
+ {children}
+
+ )
+}
diff --git a/components/TempDesignSystem/Tooltip/tooltip.module.css b/components/TempDesignSystem/Tooltip/tooltip.module.css
new file mode 100644
index 000000000..2a6b00b43
--- /dev/null
+++ b/components/TempDesignSystem/Tooltip/tooltip.module.css
@@ -0,0 +1,137 @@
+.tooltipContainer {
+ position: relative;
+ display: inline-block;
+}
+
+.tooltip {
+ padding: var(--Spacing-x1);
+ background-color: var(--UI-Text-Active);
+ border: 0.5px solid var(--UI-Border-Active);
+ border-radius: var(--Corner-radius-Medium);
+ color: var(--Base-Text-Inverted);
+ position: absolute;
+ visibility: hidden;
+ z-index: 1000;
+ opacity: 0;
+ transition: opacity 0.3s;
+ max-width: 200px;
+}
+
+.tooltipContainer:hover .tooltip {
+ visibility: visible;
+ opacity: 1;
+}
+
+.left {
+ right: 100%;
+}
+
+.right {
+ left: 100%;
+}
+
+.top {
+ bottom: 100%;
+}
+
+.bottom {
+ top: 100%;
+}
+
+.tooltip::before {
+ content: "";
+ position: absolute;
+ border-style: solid;
+}
+
+.bottom.arrowLeft::before {
+ top: -8px;
+ left: 16px;
+ border-width: 0 7px 8px 7px;
+ border-color: transparent transparent var(--UI-Text-Active) transparent;
+}
+
+.bottom.arrowCenter::before {
+ top: -8px;
+ left: 50%;
+ transform: translateX(-50%);
+ border-width: 0 7px 8px 7px;
+ border-color: transparent transparent var(--UI-Text-Active) transparent;
+}
+
+.bottom.arrowRight::before {
+ top: -8px;
+ right: 16px;
+ border-width: 0 7px 8px 7px;
+ border-color: transparent transparent var(--UI-Text-Active) transparent;
+}
+
+.top.arrowLeft::before {
+ bottom: -8px;
+ left: 16px;
+ border-width: 8px 7px 0 7px;
+ border-color: var(--UI-Text-Active) transparent transparent transparent;
+}
+
+.top.arrowCenter::before {
+ bottom: -8px;
+ left: 50%;
+ transform: translateX(-50%);
+ border-width: 8px 7px 0 7px;
+ border-color: var(--UI-Text-Active) transparent transparent transparent;
+}
+
+.top.arrowRight::before {
+ bottom: -8px;
+ right: 16px;
+ border-width: 8px 7px 0 7px;
+ border-color: var(--UI-Text-Active) transparent transparent transparent;
+}
+
+.left.arrowTop::before {
+ top: 16px;
+ right: -8px;
+ transform: translateY(-50%);
+ border-width: 7px 0 7px 8px;
+ border-color: transparent transparent transparent var(--UI-Text-Active);
+}
+
+.left.arrowCenter::before {
+ top: 50%;
+ right: -8px;
+ transform: translateY(-50%);
+ border-width: 7px 0 7px 8px;
+ border-color: transparent transparent transparent var(--UI-Text-Active);
+}
+
+.left.arrowBottom::before {
+ bottom: 16px;
+ right: -8px;
+ transform: translateY(50%);
+ border-width: 7px 0 7px 8px;
+ border-color: transparent transparent transparent var(--UI-Text-Active);
+}
+
+.right.arrowTop::before {
+ top: 16px;
+ left: -8px;
+ transform: translateY(-50%);
+ border-width: 7px 8px 7px 0;
+ border-color: transparent var(--UI-Text-Active) transparent transparent;
+}
+
+.right.arrowCenter::before {
+ top: 50%;
+ left: -8px;
+ transform: translateY(-50%);
+ border-width: 7px 8px 7px 0;
+ border-color: transparent var(--UI-Text-Active) transparent transparent;
+}
+
+.right.arrowBottom::before {
+ bottom: 16px;
+ left: -8px;
+ transform: translateY(50%);
+ border-width: 7px 8px 7px 0;
+ border-color: transparent var(--UI-Text-Active) transparent transparent;
+}
diff --git a/components/TempDesignSystem/Tooltip/variants.ts b/components/TempDesignSystem/Tooltip/variants.ts
new file mode 100644
index 000000000..286466f92
--- /dev/null
+++ b/components/TempDesignSystem/Tooltip/variants.ts
@@ -0,0 +1,21 @@
+import { cva } from "class-variance-authority"
+
+import styles from "./tooltip.module.css"
+
+export const tooltipVariants = cva(styles.tooltip, {
+ variants: {
+ position: {
+ left: styles.left,
+ right: styles.right,
+ top: styles.top,
+ bottom: styles.bottom,
+ },
+ arrow: {
+ left: styles.arrowLeft,
+ right: styles.arrowRight,
+ center: styles.arrowCenter,
+ top: styles.arrowTop,
+ bottom: styles.arrowBottom,
+ },
+ },
+})
diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json
index e29d7cf6d..26897f291 100644
--- a/i18n/dictionaries/da.json
+++ b/i18n/dictionaries/da.json
@@ -19,11 +19,12 @@
"Any changes you've made will be lost.": "Alle ændringer, du har foretaget, går tabt.",
"Are you sure you want to remove the card ending with {lastFourDigits} from your member profile?": "Er du sikker på, at du vil fjerne kortet, der slutter me {lastFourDigits} fra din medlemsprofil?",
"Arrival date": "Ankomstdato",
+ "as of today": "pr. dags dato",
"As our": "Som vores {level}",
"As our Close Friend": "Som vores nære ven",
"At latest": "Senest",
"At the hotel": "På hotellet",
- "Attractions": "Attraktioner",
+ "Attraction": "Attraktion",
"Back to scandichotels.com": "Tilbage til scandichotels.com",
"Bar": "Bar",
"Bed type": "Seng type",
@@ -70,6 +71,8 @@
"Description": "Beskrivelse",
"Destination": "Destination",
"Destinations & hotels": "Destinationer & hoteller",
+ "Disabled booking options header": "Vi beklager",
+ "Disabled booking options text": "Koder, checks og bonusnætter er endnu ikke tilgængelige på den nye hjemmeside.",
"Discard changes": "Kassér ændringer",
"Discard unsaved changes?": "Slette ændringer, der ikke er gemt?",
"Distance to city centre": "{number}km til centrum",
@@ -117,6 +120,7 @@
"Join Scandic Friends": "Tilmeld dig Scandic Friends",
"Join at no cost": "Tilmeld dig uden omkostninger",
"King bed": "Kingsize-seng",
+ "km to city center": "km til byens centrum",
"Language": "Sprog",
"Lastname": "Efternavn",
"Latest searches": "Seneste søgninger",
@@ -258,6 +262,7 @@
"Type of bed": "Sengtype",
"Type of room": "Værelsestype",
"Use bonus cheque": "Brug Bonus Cheque",
+ "Use code/voucher": "Brug kode/voucher",
"User information": "Brugeroplysninger",
"View as list": "Vis som liste",
"View as map": "Vis som kort",
diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json
index ee4bccf96..13438d8c3 100644
--- a/i18n/dictionaries/de.json
+++ b/i18n/dictionaries/de.json
@@ -23,7 +23,7 @@
"As our Close Friend": "Als unser enger Freund",
"At latest": "Spätestens",
"At the hotel": "Im Hotel",
- "Attractions": "Attraktionen",
+ "Attraction": "Attraktion",
"Back to scandichotels.com": "Zurück zu scandichotels.com",
"Bar": "Bar",
"Bed type": "Bettentyp",
@@ -70,6 +70,8 @@
"Description": "Beschreibung",
"Destination": "Bestimmungsort",
"Destinations & hotels": "Reiseziele & Hotels",
+ "Disabled booking options header": "Es tut uns leid",
+ "Disabled booking options text": "Codes, Schecks und Bonusnächte sind auf der neuen Website noch nicht verfügbar.",
"Discard changes": "Änderungen verwerfen",
"Discard unsaved changes?": "Nicht gespeicherte Änderungen verwerfen?",
"Distance to city centre": "{number}km zum Stadtzentrum",
@@ -258,6 +260,7 @@
"Type of bed": "Bettentyp",
"Type of room": "Zimmerart",
"Use bonus cheque": "Bonusscheck nutzen",
+ "Use code/voucher": "Code/Gutschein nutzen",
"User information": "Nutzerinformation",
"View as list": "Als Liste anzeigen",
"View as map": "Als Karte anzeigen",
diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json
index 1e51379f2..fa0e27a61 100644
--- a/i18n/dictionaries/en.json
+++ b/i18n/dictionaries/en.json
@@ -70,6 +70,8 @@
"Description": "Description",
"Destination": "Destination",
"Destinations & hotels": "Destinations & hotels",
+ "Disabled booking options header": "We're sorry",
+ "Disabled booking options text": "Codes, cheques and reward nights aren't available on the new website yet.",
"Discard changes": "Discard changes",
"Discard unsaved changes?": "Discard unsaved changes?",
"Distance to city centre": "{number}km to city centre",
@@ -117,6 +119,7 @@
"Join Scandic Friends": "Join Scandic Friends",
"Join at no cost": "Join at no cost",
"King bed": "King bed",
+ "km to city center": "km to city center",
"Language": "Language",
"Lastname": "Lastname",
"Latest searches": "Latest searches",
@@ -258,6 +261,7 @@
"Type of bed": "Type of bed",
"Type of room": "Type of room",
"Use bonus cheque": "Use bonus cheque",
+ "Use code/voucher": "Use code/voucher",
"User information": "User information",
"View as list": "View as list",
"View as map": "View as map",
diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json
index 5e3ab2fc4..a00928ad3 100644
--- a/i18n/dictionaries/fi.json
+++ b/i18n/dictionaries/fi.json
@@ -70,6 +70,8 @@
"Description": "Kuvaus",
"Destination": "Kohde",
"Destinations & hotels": "Kohteet ja hotellit",
+ "Disabled booking options header": "Olemme pahoillamme",
+ "Disabled booking options text": "Koodit, sekit ja palkintoillat eivät ole vielä saatavilla uudella verkkosivustolla.",
"Discard changes": "Hylkää muutokset",
"Discard unsaved changes?": "Hylkäätkö tallentamattomat muutokset?",
"Distance to city centre": "{number}km Etäisyys kaupunkiin",
@@ -117,6 +119,7 @@
"Join Scandic Friends": "Liity jäseneksi",
"Join at no cost": "Liity maksutta",
"King bed": "King-vuode",
+ "km to city center": "km keskustaan",
"Language": "Kieli",
"Lastname": "Sukunimi",
"Latest searches": "Viimeisimmät haut",
@@ -259,6 +262,7 @@
"Type of bed": "Vuodetyyppi",
"Type of room": "Huonetyyppi",
"Use bonus cheque": "Käytä bonussekkiä",
+ "Use code/voucher": "Käytä koodia/voucheria",
"User information": "Käyttäjän tiedot",
"View as list": "Näytä listana",
"View as map": "Näytä kartalla",
diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json
index 1dd97b8f2..9a28e6f69 100644
--- a/i18n/dictionaries/no.json
+++ b/i18n/dictionaries/no.json
@@ -19,6 +19,7 @@
"Any changes you've made will be lost.": "Eventuelle endringer du har gjort, går tapt.",
"Are you sure you want to remove the card ending with {lastFourDigits} from your member profile?": "Er du sikker på at du vil fjerne kortet som slutter på {lastFourDigits} fra medlemsprofilen din?",
"Arrival date": "Ankomstdato",
+ "as of today": "per i dag",
"As our": "Som vår {level}",
"As our Close Friend": "Som vår nære venn",
"At latest": "Senest",
@@ -69,6 +70,8 @@
"Description": "Beskrivelse",
"Destination": "Destinasjon",
"Destinations & hotels": "Destinasjoner og hoteller",
+ "Disabled booking options header": "Vi beklager",
+ "Disabled booking options text": "Koder, checks og belønningsnætter er enda ikke tilgjengelige på den nye nettsiden.",
"Discard changes": "Forkaste endringer",
"Discard unsaved changes?": "Forkaste endringer som ikke er lagret?",
"Distance to city centre": "{number}km til sentrum",
@@ -116,6 +119,7 @@
"Join Scandic Friends": "Bli med i Scandic Friends",
"Join at no cost": "Bli med uten kostnad",
"King bed": "King-size-seng",
+ "km to city center": "km til sentrum",
"Language": "Språk",
"Lastname": "Etternavn",
"Latest searches": "Siste søk",
@@ -257,6 +261,7 @@
"Type of bed": "Sengtype",
"Type of room": "Romtype",
"Use bonus cheque": "Bruk bonussjekk",
+ "Use code/voucher": "Bruk kode/voucher",
"User information": "Brukerinformasjon",
"View as list": "Vis som liste",
"View as map": "Vis som kart",
diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json
index 6f5fcd37a..dc6a082c8 100644
--- a/i18n/dictionaries/sv.json
+++ b/i18n/dictionaries/sv.json
@@ -19,6 +19,7 @@
"Any changes you've made will be lost.": "Alla ändringar du har gjort kommer att gå förlorade.",
"Are you sure you want to remove the card ending with {lastFourDigits} from your member profile?": "Är du säker på att du vill ta bort kortet som slutar med {lastFourDigits} från din medlemsprofil?",
"Arrival date": "Ankomstdatum",
+ "as of today": "per idag",
"As our": "Som vår {level}",
"As our Close Friend": "Som vår nära vän",
"At latest": "Senast",
@@ -70,6 +71,8 @@
"Description": "Beskrivning",
"Destination": "Destination",
"Destinations & hotels": "Destinationer & hotell",
+ "Disabled booking options header": "Vi beklagar",
+ "Disabled booking options text": "Koder, bonuscheckar och belöningsnätter är inte tillgängliga på den nya webbplatsen än.",
"Discard changes": "Ignorera ändringar",
"Discard unsaved changes?": "Vill du ignorera ändringar som inte har sparats?",
"Distance to city centre": "{number}km till centrum",
@@ -118,6 +121,7 @@
"Join Scandic Friends": "Gå med i Scandic Friends",
"Join at no cost": "Gå med utan kostnad",
"King bed": "King size-säng",
+ "km to city center": "km till stadens centrum",
"Language": "Språk",
"Lastname": "Efternamn",
"Latest searches": "Senaste sökningarna",
@@ -258,7 +262,9 @@
"Tripadvisor reviews": "{rating} ({count} recensioner på Tripadvisor)",
"Type of bed": "Sängtyp",
"Type of room": "Rumstyp",
- "Use bonus cheque": "Use bonus cheque",
+ "uppercase letter": "stor bokstav",
+ "Use bonus cheque": "Använd bonuscheck",
+ "Use code/voucher": "Använd kod/voucher",
"User information": "Användarinformation",
"View as list": "Visa som lista",
"View as map": "Visa som karta",
diff --git a/types/components/bookingWidget/index.ts b/types/components/bookingWidget/index.ts
index ab4d194d9..fb511bc86 100644
--- a/types/components/bookingWidget/index.ts
+++ b/types/components/bookingWidget/index.ts
@@ -1,13 +1,24 @@
+import { VariantProps } from "class-variance-authority"
import { z } from "zod"
import { bookingWidgetSchema } from "@/components/Forms/BookingWidget/schema"
+import { bookingWidgetVariants } from "@/components/Forms/BookingWidget/variants"
import type { Locations } from "@/types/trpc/routers/hotel/locations"
export type BookingWidgetSchema = z.output
+export type BookingWidgetType = VariantProps<
+ typeof bookingWidgetVariants
+>["type"]
+
+export interface BookingWidgetProps {
+ type?: BookingWidgetType
+}
+
export interface BookingWidgetClientProps {
locations: Locations
+ type?: BookingWidgetType
}
export interface BookingWidgetToggleButtonProps {
diff --git a/types/components/form/bookingwidget.ts b/types/components/form/bookingwidget.ts
index f9ef4d2e1..e655b8b59 100644
--- a/types/components/form/bookingwidget.ts
+++ b/types/components/form/bookingwidget.ts
@@ -1,11 +1,20 @@
+import { FormState, UseFormReturn } from "react-hook-form"
+
+import type {
+ BookingWidgetSchema,
+ BookingWidgetType,
+} from "@/types/components/bookingWidget"
import type { Location, Locations } from "@/types/trpc/routers/hotel/locations"
export interface BookingWidgetFormProps {
locations: Locations
+ type?: BookingWidgetType
}
export interface BookingWidgetFormContentProps {
locations: Locations
+ formId: string
+ formState: FormState
}
export enum ActionType {
diff --git a/types/components/search.ts b/types/components/search.ts
index 6f1017126..42401045f 100644
--- a/types/components/search.ts
+++ b/types/components/search.ts
@@ -39,14 +39,14 @@ export interface ListItemProps
export interface DialogProps
extends React.PropsWithChildren,
- VariantProps,
- Pick {
+ VariantProps,
+ Pick {
className?: string
}
export interface ErrorDialogProps
extends React.PropsWithChildren,
- Pick { }
+ Pick {}
export interface ClearSearchButtonProps
extends Pick<
diff --git a/types/components/tooltip.ts b/types/components/tooltip.ts
new file mode 100644
index 000000000..ff7ed6ecc
--- /dev/null
+++ b/types/components/tooltip.ts
@@ -0,0 +1,21 @@
+export type TooltipPosition = "left" | "right" | "top" | "bottom"
+type VerticalArrow = "top" | "bottom" | "center"
+type HorizontalArrow = "left" | "right" | "center"
+
+type ValidArrowMap = {
+ left: VerticalArrow
+ right: VerticalArrow
+ top: HorizontalArrow
+ bottom: HorizontalArrow
+}
+
+type ValidArrow = P extends keyof ValidArrowMap
+ ? ValidArrowMap[P]
+ : never
+
+export interface TooltipProps
{
+ heading?: string
+ text?: string
+ position: P
+ arrow: ValidArrow
+}