diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/step/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/step/page.tsx index 67f221c78..bcfcca8c6 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/step/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/step/page.tsx @@ -13,8 +13,8 @@ import { import BedType from "@/components/HotelReservation/EnterDetails/BedType" import Breakfast from "@/components/HotelReservation/EnterDetails/Breakfast" import Details from "@/components/HotelReservation/EnterDetails/Details" +import HotelHeader from "@/components/HotelReservation/EnterDetails/Header" import HistoryStateManager from "@/components/HotelReservation/EnterDetails/HistoryStateManager" -import HotelHeader from "@/components/HotelReservation/EnterDetails/HotelHeader" import Payment from "@/components/HotelReservation/EnterDetails/Payment" import SectionAccordion from "@/components/HotelReservation/EnterDetails/SectionAccordion" import SelectedRoom from "@/components/HotelReservation/EnterDetails/SelectedRoom" @@ -91,13 +91,13 @@ export default async function StepPage({ const packages = packageCodes ? await getPackages({ - adults, - children: children?.length, - endDate: toDate, - hotelId, - packageCodes, - startDate: fromDate, - }) + adults, + children: children?.length, + endDate: toDate, + hotelId, + packageCodes, + startDate: fromDate, + }) : null const roomAvailability = await getSelectedRoomAvailability( @@ -138,9 +138,9 @@ export default async function StepPage({ const memberPrice = roomAvailability.memberRate ? { - price: roomAvailability.memberRate.localPrice.pricePerStay, - currency: roomAvailability.memberRate.localPrice.currency, - } + price: roomAvailability.memberRate.localPrice.pricePerStay, + currency: roomAvailability.memberRate.localPrice.currency, + } : undefined return ( @@ -158,7 +158,7 @@ export default async function StepPage({ user={user} >
- +
diff --git a/components/HotelReservation/EnterDetails/Header/ToggleSidePeek.tsx b/components/HotelReservation/EnterDetails/Header/ToggleSidePeek.tsx new file mode 100644 index 000000000..af81d9856 --- /dev/null +++ b/components/HotelReservation/EnterDetails/Header/ToggleSidePeek.tsx @@ -0,0 +1,32 @@ +"use client" +import { useIntl } from "react-intl" + +import useSidePeekStore from "@/stores/sidepeek" + +import ChevronRight from "@/components/Icons/ChevronRight" +import Button from "@/components/TempDesignSystem/Button" + +import styles from "./header.module.css" + +import { SidePeekEnum } from "@/types/components/hotelReservation/sidePeek" +import { ToggleSidePeekProps } from "@/types/components/hotelReservation/toggleSidePeekProps" + +export default function ToggleSidePeek({ hotelId }: ToggleSidePeekProps) { + const intl = useIntl() + const openSidePeek = useSidePeekStore((state) => state.openSidePeek) + + return ( + + ) +} diff --git a/components/HotelReservation/EnterDetails/Header/header.module.css b/components/HotelReservation/EnterDetails/Header/header.module.css new file mode 100644 index 000000000..a2b8fbdcb --- /dev/null +++ b/components/HotelReservation/EnterDetails/Header/header.module.css @@ -0,0 +1,53 @@ +.header { + position: relative; + overflow: hidden; +} + +.hero { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 100%; + width: 100%; + object-fit: cover; +} + +.wrapper { + position: relative; + padding: var(--Spacing-x3) var(--Spacing-x2); + background-color: rgba(57, 57, 57, 0.5); + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: var(--Spacing-x2); +} + +.titleContainer { + display: flex; + flex-direction: column; + gap: var(--Spacing-x-half); +} + +.address { + display: flex; + gap: var(--Spacing-x-one-and-half); + font-style: normal; +} + +.toggle { + padding: 0px !important; +} + +@media (min-width: 768px) { + .wrapper { + padding: var(--Spacing-x3) var(--Spacing-x3); + } +} + +@media screen and (min-width: 1367px) { + .wrapper { + padding: var(--Spacing-x6) var(--Spacing-x5); + } +} diff --git a/components/HotelReservation/EnterDetails/HotelHeader/index.tsx b/components/HotelReservation/EnterDetails/Header/index.tsx similarity index 59% rename from components/HotelReservation/EnterDetails/HotelHeader/index.tsx rename to components/HotelReservation/EnterDetails/Header/index.tsx index cf2d5fb9c..818b9c996 100644 --- a/components/HotelReservation/EnterDetails/HotelHeader/index.tsx +++ b/components/HotelReservation/EnterDetails/Header/index.tsx @@ -1,31 +1,40 @@ -import Divider from "@/components/TempDesignSystem/Divider" -import Body from "@/components/TempDesignSystem/Text/Body" +import Image from "@/components/Image" import Caption from "@/components/TempDesignSystem/Text/Caption" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" import getSingleDecimal from "@/utils/numberFormatting" +import ToggleSidePeek from "./ToggleSidePeek" + import styles from "./header.module.css" import type { HotelHeaderProps } from "@/types/components/hotelReservation/enterDetails/hotelHeader" -export default async function HotelHeader({ hotel }: HotelHeaderProps) { +export default async function HotelHeader({ hotelData }: HotelHeaderProps) { const intl = await getIntl() + const hotel = hotelData.data.attributes + + const image = hotel.hotelContent?.images return (
+ {image.metaData.altText
- + <Title as="h1" level="h1" color="white"> {hotel.name}
- + {hotel.address.streetAddress}, {hotel.address.city} -
- -
- + ∙ + {intl.formatMessage( { id: "Distance in km to city centre" }, { @@ -37,14 +46,7 @@ export default async function HotelHeader({ hotel }: HotelHeaderProps) {
-
- -
-
- - {hotel.hotelContent.texts.descriptions.short} - -
+
) diff --git a/components/HotelReservation/EnterDetails/HotelHeader/header.module.css b/components/HotelReservation/EnterDetails/HotelHeader/header.module.css deleted file mode 100644 index 82d6353ac..000000000 --- a/components/HotelReservation/EnterDetails/HotelHeader/header.module.css +++ /dev/null @@ -1,64 +0,0 @@ -.header { - background-color: var(--Base-Surface-Subtle-Normal); - padding: var(--Spacing-x3) var(--Spacing-x2); -} - -.wrapper { - display: flex; - flex-direction: column; - gap: var(--Spacing-x3); - justify-content: center; -} - -.titleContainer { - display: flex; - flex-direction: column; - align-items: flex-start; - justify-content: center; - gap: var(--Spacing-x1); -} - -.descriptionContainer { - display: flex; - flex-direction: column; - gap: var(--Spacing-x-one-and-half); -} - -.address { - display: flex; - gap: var(--Spacing-x-one-and-half); - font-style: normal; -} - -.dividerContainer { - display: none; -} - -@media (min-width: 768px) { - .header { - padding: var(--Spacing-x4) 0; - } - - .wrapper { - flex-direction: row; - gap: var(--Spacing-x6); - margin: 0 auto; - /* simulates padding on viewport smaller than --max-width-navigation */ - width: min( - calc(100dvw - (var(--Spacing-x2) * 2)), - var(--max-width-navigation) - ); - } - - .titleContainer > h1 { - white-space: nowrap; - } - - .dividerContainer { - display: block; - } - - .address { - gap: var(--Spacing-x3); - } -} diff --git a/components/TempDesignSystem/Button/button.module.css b/components/TempDesignSystem/Button/button.module.css index 1ad432836..8dda9d9e1 100644 --- a/components/TempDesignSystem/Button/button.module.css +++ b/components/TempDesignSystem/Button/button.module.css @@ -265,6 +265,10 @@ a.default { color: var(--Base-Button-Text-On-Fill-Normal); } +.baseTextInverted { + color: var(--Base-Button-Primary-On-Fill-Normal); +} + .baseText:active, .baseText:focus, .baseText:hover { diff --git a/components/TempDesignSystem/Button/variants.ts b/components/TempDesignSystem/Button/variants.ts index 77abd40e4..f79e2dc26 100644 --- a/components/TempDesignSystem/Button/variants.ts +++ b/components/TempDesignSystem/Button/variants.ts @@ -10,6 +10,7 @@ export const buttonVariants = cva(styles.btn, { secondary: styles.secondary, tertiary: styles.tertiary, text: styles.text, + textInverted: styles.text, }, size: { small: styles.small, @@ -140,5 +141,10 @@ export const buttonVariants = cva(styles.btn, { intent: "text", theme: "base", }, + { + className: styles.baseTextInverted, + intent: "textInverted", + theme: "base", + }, ], }) diff --git a/types/components/hotelReservation/enterDetails/hotelHeader.ts b/types/components/hotelReservation/enterDetails/hotelHeader.ts index 2d7d2185d..afb69676d 100644 --- a/types/components/hotelReservation/enterDetails/hotelHeader.ts +++ b/types/components/hotelReservation/enterDetails/hotelHeader.ts @@ -3,5 +3,5 @@ import type { RouterOutput } from "@/lib/trpc/client" type HotelDataGet = RouterOutput["hotel"]["hotelData"]["get"] export interface HotelHeaderProps { - hotel: NonNullable["data"]["attributes"] + hotelData: NonNullable } diff --git a/types/components/hotelReservation/toggleSidePeekProps.ts b/types/components/hotelReservation/toggleSidePeekProps.ts index b1139e180..6c4282059 100644 --- a/types/components/hotelReservation/toggleSidePeekProps.ts +++ b/types/components/hotelReservation/toggleSidePeekProps.ts @@ -1,4 +1,4 @@ export type ToggleSidePeekProps = { hotelId: string - roomTypeCode: string + roomTypeCode?: string }