Merged in feat/BOOK-61-refactor-hotel-page-css-variables (pull request #3014)
Feat/BOOK-61 refactor hotel page css variables * feat(BOOK-61): Breadcrumbs * feat(BOOK-61): intro section * feat(BOOK-61): show more button * feat(BOOK-61): rooms section * feat(BOOK-61): sidepeeks * feat(BOOK-61): deprecated old Link component * feat(BOOK-61): added new TextLink component to the design-system * feat(BOOK-61): replaced deprecated links with new TextLink component * feat(BOOK-61): miscellaneous changes Approved-by: Bianca Widstam Approved-by: Christel Westerberg
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
|||||||
} from "@scandic-hotels/common/constants/language"
|
} from "@scandic-hotels/common/constants/language"
|
||||||
import { Button } from "@scandic-hotels/design-system/Button"
|
import { Button } from "@scandic-hotels/design-system/Button"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { languageSwitcherVariants } from "./variants"
|
import { languageSwitcherVariants } from "./variants"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
rates,
|
rates,
|
||||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
import { sasEuroBonus } from "@scandic-hotels/common/constants/routes/sasEuroBonus"
|
import { sasEuroBonus } from "@scandic-hotels/common/constants/routes/sasEuroBonus"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { LanguageSwitcher } from "@/components/LanguageSwitcher"
|
import { LanguageSwitcher } from "@/components/LanguageSwitcher"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useIntl } from "react-intl"
|
|||||||
|
|
||||||
import { customerService } from "@scandic-hotels/common/constants/routes/customerService"
|
import { customerService } from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { LanguageSwitcher } from "@/components/LanguageSwitcher"
|
import { LanguageSwitcher } from "@/components/LanguageSwitcher"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useEffect, useState } from "react"
|
|||||||
import { useMediaQuery } from "usehooks-ts"
|
import { useMediaQuery } from "usehooks-ts"
|
||||||
|
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import useLang from "@/hooks/useLang"
|
import useLang from "@/hooks/useLang"
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,11 @@ export default async function HotelPagePage(
|
|||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<div className={cx(styles.hotelPage, hotelTheme)}>
|
<div className={cx(styles.hotelPage, hotelTheme)}>
|
||||||
<HotelPage hotelData={hotelData} hotelPageData={hotelPageData} />
|
<HotelPage
|
||||||
|
theme={hotelTheme}
|
||||||
|
hotelData={hotelData}
|
||||||
|
hotelPageData={hotelPageData}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
|||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import ScandicLogoIcon from "@scandic-hotels/design-system/Icons/ScandicLogoIcon"
|
import ScandicLogoIcon from "@scandic-hotels/design-system/Icons/ScandicLogoIcon"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { supportEmail, supportPhone } from "@/constants/contactSupport"
|
import { supportEmail, supportPhone } from "@/constants/contactSupport"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import styles from "./SASModal.module.css"
|
import styles from "./SASModal.module.css"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { ArrowLeft } from "react-feather"
|
|||||||
|
|
||||||
import { overview as profileOverview } from "@scandic-hotels/common/constants/routes/myPages"
|
import { overview as profileOverview } from "@scandic-hotels/common/constants/routes/myPages"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
import background from "@/public/_static/img/partner/sas/sas_x_scandic_airplane_window_background.jpg"
|
import background from "@/public/_static/img/partner/sas/sas_x_scandic_airplane_window_background.jpg"
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import { profileEdit } from "@scandic-hotels/common/constants/routes/myPages"
|
|||||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { sasPartnershipTermsAndConditions } from "@/constants/webHrefs"
|
import { sasPartnershipTermsAndConditions } from "@/constants/webHrefs"
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import { redirect } from "next/navigation"
|
import { redirect } from "next/navigation"
|
||||||
import React from "react"
|
|
||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
import Footnote from "@scandic-hotels/design-system/Footnote"
|
import Footnote from "@scandic-hotels/design-system/Footnote"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { env } from "@/env/server"
|
import { env } from "@/env/server"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { type ReactNode, useState, useTransition } from "react"
|
|||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { trpc } from "@scandic-hotels/trpc/client"
|
import { trpc } from "@scandic-hotels/trpc/client"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
|
import { cx } from "class-variance-authority"
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
|
|
||||||
import Accordion from "@scandic-hotels/design-system/Accordion"
|
import Accordion from "@scandic-hotels/design-system/Accordion"
|
||||||
@@ -7,7 +8,7 @@ import AccordionItem from "@scandic-hotels/design-system/Accordion/AccordionItem
|
|||||||
import { JsonToHtml } from "@scandic-hotels/design-system/JsonToHtml"
|
import { JsonToHtml } from "@scandic-hotels/design-system/JsonToHtml"
|
||||||
|
|
||||||
import { Section } from "@/components/Section"
|
import { Section } from "@/components/Section"
|
||||||
import SectionHeader from "@/components/Section/Header/Deprecated"
|
import { SectionHeader } from "@/components/Section/Header"
|
||||||
import ShowMoreButton from "@/components/TempDesignSystem/ShowMoreButton"
|
import ShowMoreButton from "@/components/TempDesignSystem/ShowMoreButton"
|
||||||
|
|
||||||
import styles from "./accordion.module.css"
|
import styles from "./accordion.module.css"
|
||||||
@@ -26,9 +27,11 @@ export default function AccordionSection({ accordion, title }: AccordionProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Section className={styles.accordionSection} id={HotelHashValues.faq}>
|
<Section className={styles.accordionSection} id={HotelHashValues.faq}>
|
||||||
<SectionHeader textTransform="uppercase" title={title} />
|
<SectionHeader heading={title} typography="Title/md" />
|
||||||
<Accordion
|
<Accordion
|
||||||
className={`${styles.accordion} ${allAccordionsVisible ? styles.allVisible : ""}`}
|
className={cx(styles.accordion, {
|
||||||
|
[styles.allVisible]: allAccordionsVisible,
|
||||||
|
})}
|
||||||
>
|
>
|
||||||
{accordion.map((acc) =>
|
{accordion.map((acc) =>
|
||||||
acc ? (
|
acc ? (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { usePathname } from "next/navigation"
|
|||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { dt } from "@scandic-hotels/common/dt"
|
import { dt } from "@scandic-hotels/common/dt"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Table from "@scandic-hotels/design-system/Table"
|
import Table from "@scandic-hotels/design-system/Table"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { Transactions } from "@scandic-hotels/trpc/enums/transactions"
|
import { Transactions } from "@scandic-hotels/trpc/enums/transactions"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Title from "@scandic-hotels/design-system/Title"
|
import Title from "@scandic-hotels/design-system/Title"
|
||||||
|
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { dt } from "@scandic-hotels/common/dt"
|
|||||||
import Caption from "@scandic-hotels/design-system/Caption"
|
import Caption from "@scandic-hotels/design-system/Caption"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Title from "@scandic-hotels/design-system/Title"
|
import Title from "@scandic-hotels/design-system/Title"
|
||||||
|
|
||||||
import useLang from "@/hooks/useLang"
|
import useLang from "@/hooks/useLang"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Preamble from "@scandic-hotels/design-system/Preamble"
|
import Preamble from "@scandic-hotels/design-system/Preamble"
|
||||||
import Title from "@scandic-hotels/design-system/Title"
|
import Title from "@scandic-hotels/design-system/Title"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import styles from "./shortcutsListItems.module.css"
|
import styles from "./shortcutsListItems.module.css"
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ export default function TableBlock({ data }: TableBlockProps) {
|
|||||||
</Table>
|
</Table>
|
||||||
{showMoreVisible ? (
|
{showMoreVisible ? (
|
||||||
<ShowMoreButton
|
<ShowMoreButton
|
||||||
|
className={styles.showMoreButton}
|
||||||
loadMoreData={handleShowMore}
|
loadMoreData={handleShowMore}
|
||||||
showLess={showLessVisible}
|
showLess={showLessVisible}
|
||||||
buttonIntent="table"
|
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
.tableWrapper {
|
.tableWrapper {
|
||||||
display: grid;
|
display: grid;
|
||||||
border: 1px solid var(--Base-Border-Subtle);
|
border: 1px solid var(--Border-Default);
|
||||||
border-radius: var(--Corner-radius-sm);
|
border-radius: var(--Corner-radius-sm);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.showMoreButton {
|
||||||
|
border-top: 1px solid var(--Border-Default);
|
||||||
|
background-color: var(--Surface-Primary-Default);
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,15 +5,11 @@ import { generateBreadcrumbsSchema } from "@/utils/jsonSchemas"
|
|||||||
|
|
||||||
import type { BreadcrumbsProps } from "@/components/TempDesignSystem/Breadcrumbs/breadcrumbs"
|
import type { BreadcrumbsProps } from "@/components/TempDesignSystem/Breadcrumbs/breadcrumbs"
|
||||||
|
|
||||||
interface Props extends Pick<BreadcrumbsProps, "color" | "size"> {
|
interface Props extends Omit<BreadcrumbsProps, "breadcrumbs"> {
|
||||||
subpageTitle?: string
|
subpageTitle?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Breadcrumbs({
|
export default async function Breadcrumbs({ subpageTitle, ...props }: Props) {
|
||||||
color,
|
|
||||||
size,
|
|
||||||
subpageTitle,
|
|
||||||
}: Props) {
|
|
||||||
const caller = await serverClient()
|
const caller = await serverClient()
|
||||||
const breadcrumbs = await caller.contentstack.breadcrumbs.get()
|
const breadcrumbs = await caller.contentstack.breadcrumbs.get()
|
||||||
if (!breadcrumbs?.length) {
|
if (!breadcrumbs?.length) {
|
||||||
@@ -34,7 +30,7 @@ export default async function Breadcrumbs({
|
|||||||
__html: JSON.stringify(jsonSchema.jsonLd),
|
__html: JSON.stringify(jsonSchema.jsonLd),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<BreadcrumbsComp breadcrumbs={breadcrumbs} color={color} size={size} />
|
<BreadcrumbsComp breadcrumbs={breadcrumbs} {...props} />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
.card {
|
.card {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.imageContainer,
|
||||||
|
.image {
|
||||||
|
border-radius: var(--Corner-radius-lg);
|
||||||
|
}
|
||||||
|
.image {
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.imageContainer {
|
.imageContainer {
|
||||||
@@ -21,34 +31,28 @@
|
|||||||
border-radius 0.3s ease-in-out;
|
border-radius 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:hover,
|
|
||||||
.card:hover .imageContainer,
|
|
||||||
.card:hover .image {
|
|
||||||
border-radius: var(--Corner-radius-lg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card:hover .image {
|
|
||||||
transform: scale(1.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.promoTag {
|
.promoTag {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 14px;
|
top: 14px;
|
||||||
left: 14px;
|
left: 14px;
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: var(--Spacing-x-one-and-half);
|
padding: var(--Space-x15);
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: var(--Spacing-x-one-and-half);
|
gap: var(--Space-x15);
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.content {
|
.content {
|
||||||
padding: var(--Spacing-x2) var(--Spacing-x2) var(--Spacing-x2) 0;
|
padding: var(--Space-x2) var(--Space-x2) var(--Space-x2) 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import Body from "@scandic-hotels/design-system/Body"
|
import NextLink from "next/link"
|
||||||
|
|
||||||
import Chip from "@scandic-hotels/design-system/Chip"
|
import Chip from "@scandic-hotels/design-system/Chip"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
|
||||||
|
|
||||||
import styles from "./contentCard.module.css"
|
import styles from "./contentCard.module.css"
|
||||||
|
|
||||||
@@ -46,8 +46,12 @@ export default function ContentCard({
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
<Subtitle type="two">{heading}</Subtitle>
|
<Typography variant="Title/Subtitle/md">
|
||||||
<Body>{bodyText}</Body>
|
<h4>{heading}</h4>
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="Body/Paragraph/mdRegular">
|
||||||
|
<p>{bodyText}</p>
|
||||||
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
)
|
)
|
||||||
@@ -55,6 +59,7 @@ export default function ContentCard({
|
|||||||
if (!link) return card
|
if (!link) return card
|
||||||
|
|
||||||
const linkProps = {
|
const linkProps = {
|
||||||
|
className: styles.link,
|
||||||
...(link.openInNewTab && {
|
...(link.openInNewTab && {
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
rel: "noopener noreferrer",
|
rel: "noopener noreferrer",
|
||||||
@@ -62,8 +67,8 @@ export default function ContentCard({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={link.href} {...linkProps}>
|
<NextLink href={link.href} {...linkProps}>
|
||||||
{card}
|
{card}
|
||||||
</Link>
|
</NextLink>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
|||||||
import { IconButton } from "@scandic-hotels/design-system/IconButton"
|
import { IconButton } from "@scandic-hotels/design-system/IconButton"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import ImageFallback from "@scandic-hotels/design-system/ImageFallback"
|
import ImageFallback from "@scandic-hotels/design-system/ImageFallback"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useDestinationPageCitiesMapStore } from "@/stores/destination-page-cities-map"
|
import { useDestinationPageCitiesMapStore } from "@/stores/destination-page-cities-map"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { useIntl } from "react-intl"
|
|||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import ImageFallback from "@scandic-hotels/design-system/ImageFallback"
|
import ImageFallback from "@scandic-hotels/design-system/ImageFallback"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useDestinationDataStore } from "@/stores/destination-data"
|
import { useDestinationDataStore } from "@/stores/destination-data"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable formatjs/no-literal-string-in-jsx */
|
/* eslint-disable formatjs/no-literal-string-in-jsx */
|
||||||
|
|
||||||
import { setMapUrlFromCountryPage } from "@scandic-hotels/common/hooks/map/useSetMapUrlFromCountryPage"
|
import { setMapUrlFromCountryPage } from "@scandic-hotels/common/hooks/map/useSetMapUrlFromCountryPage"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import styles from "./locationsList.module.css"
|
import styles from "./locationsList.module.css"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import AccordionItem from "@scandic-hotels/design-system/Accordion/AccordionItem"
|
import AccordionItem from "@scandic-hotels/design-system/Accordion/AccordionItem"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useIntl } from "react-intl"
|
|||||||
|
|
||||||
import Accordion from "@scandic-hotels/design-system/Accordion"
|
import Accordion from "@scandic-hotels/design-system/Accordion"
|
||||||
import AccordionItem from "@scandic-hotels/design-system/Accordion/AccordionItem"
|
import AccordionItem from "@scandic-hotels/design-system/Accordion/AccordionItem"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import { useDestinationDataStore } from "@/stores/destination-data"
|
import { useDestinationDataStore } from "@/stores/destination-data"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.amenitiesContainer {
|
.amenitiesContainer {
|
||||||
background-color: var(--Base-Surface-Subtle-Normal);
|
background-color: var(--Surface-Secondary-Default);
|
||||||
border-radius: var(--Corner-radius-lg);
|
border-radius: var(--Corner-radius-lg);
|
||||||
padding: var(--Space-x3) var(--Space-x3) var(--Space-x15) var(--Space-x3);
|
padding: var(--Space-x3) var(--Space-x3) var(--Space-x15) var(--Space-x3);
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting"
|
|||||||
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
||||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { Country } from "@scandic-hotels/trpc/types/country"
|
import { Country } from "@scandic-hotels/trpc/types/country"
|
||||||
|
|
||||||
@@ -31,6 +31,7 @@ interface IntroSectionProps {
|
|||||||
location: HotelLocation
|
location: HotelLocation
|
||||||
tripAdvisor: HotelTripAdvisor
|
tripAdvisor: HotelTripAdvisor
|
||||||
contactInformation: Hotel["contactInformation"]
|
contactInformation: Hotel["contactInformation"]
|
||||||
|
isThemed: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function IntroSection({
|
export default async function IntroSection({
|
||||||
@@ -40,6 +41,7 @@ export default async function IntroSection({
|
|||||||
address,
|
address,
|
||||||
tripAdvisor,
|
tripAdvisor,
|
||||||
contactInformation,
|
contactInformation,
|
||||||
|
isThemed,
|
||||||
}: IntroSectionProps) {
|
}: IntroSectionProps) {
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
const { streetAddress, city, country } = address
|
const { streetAddress, city, country } = address
|
||||||
@@ -61,7 +63,11 @@ export default async function IntroSection({
|
|||||||
<div className={styles.mainContent}>
|
<div className={styles.mainContent}>
|
||||||
<div className={styles.titleContainer}>
|
<div className={styles.titleContainer}>
|
||||||
<Typography variant="Title/Decorative/lg">
|
<Typography variant="Title/Decorative/lg">
|
||||||
<span className={styles.script}>
|
<span
|
||||||
|
className={cx(styles.script, {
|
||||||
|
[styles.isThemed]: isThemed,
|
||||||
|
})}
|
||||||
|
>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "hotel.introSection.welcomeTo",
|
id: "hotel.introSection.welcomeTo",
|
||||||
defaultMessage: "Welcome to",
|
defaultMessage: "Welcome to",
|
||||||
@@ -86,16 +92,10 @@ export default async function IntroSection({
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className={styles.phoneNumber}>
|
<div className={styles.phoneNumber}>
|
||||||
<Link
|
<TextLink href={`tel:${phoneNumber}`} typography="Link/sm">
|
||||||
href={`tel:${phoneNumber}`}
|
|
||||||
size="small"
|
|
||||||
color="Text/Interactive/Secondary"
|
|
||||||
textDecoration="underline"
|
|
||||||
variant="icon"
|
|
||||||
>
|
|
||||||
<MaterialIcon icon="phone" color="CurrentColor" size={20} />
|
<MaterialIcon icon="phone" color="CurrentColor" size={20} />
|
||||||
{phoneNumber}
|
{phoneNumber}
|
||||||
</Link>
|
</TextLink>
|
||||||
<LocalCallCharges
|
<LocalCallCharges
|
||||||
className={styles.localCharges}
|
className={styles.localCharges}
|
||||||
country={country}
|
country={country}
|
||||||
@@ -103,21 +103,15 @@ export default async function IntroSection({
|
|||||||
</div>
|
</div>
|
||||||
{!showLocalCharges && (
|
{!showLocalCharges && (
|
||||||
<Divider
|
<Divider
|
||||||
className={styles.divider}
|
className={styles.contactInformationDivider}
|
||||||
variant="vertical"
|
variant="vertical"
|
||||||
color="Border/Divider/Default"
|
color="Border/Divider/Default"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Link
|
<TextLink href={`mailto:${email}`} typography="Link/sm">
|
||||||
href={`mailto:${email}`}
|
|
||||||
size="small"
|
|
||||||
color="Text/Interactive/Secondary"
|
|
||||||
textDecoration="underline"
|
|
||||||
variant="icon"
|
|
||||||
>
|
|
||||||
<MaterialIcon icon="email" color="CurrentColor" size={20} />
|
<MaterialIcon icon="email" color="CurrentColor" size={20} />
|
||||||
{email}
|
{email}
|
||||||
</Link>
|
</TextLink>
|
||||||
</div>
|
</div>
|
||||||
</address>
|
</address>
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,19 @@
|
|||||||
.introSection {
|
.introSection {
|
||||||
display: grid;
|
|
||||||
gap: var(--Space-x2);
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: grid;
|
||||||
|
gap: var(--Space-x3);
|
||||||
max-width: var(--hotel-page-intro-section-width);
|
max-width: var(--hotel-page-intro-section-width);
|
||||||
}
|
}
|
||||||
|
|
||||||
.localCharges::before {
|
|
||||||
content: " (";
|
|
||||||
}
|
|
||||||
|
|
||||||
.localCharges::after {
|
|
||||||
content: ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
.mainContent {
|
.mainContent {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Space-x15);
|
|
||||||
justify-items: start;
|
justify-items: start;
|
||||||
|
gap: var(--Space-x1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.subtitleContent {
|
.titleContainer {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Space-x05);
|
gap: var(--Space-x025);
|
||||||
justify-items: start;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
@@ -30,19 +21,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.script {
|
.script {
|
||||||
transform: rotate(-4deg);
|
|
||||||
color: var(--Text-Accent-Primary);
|
color: var(--Text-Accent-Primary);
|
||||||
}
|
&:not(.isThemed) {
|
||||||
|
transform: rotate(-3deg);
|
||||||
.titleContainer {
|
transform-origin: left;
|
||||||
display: grid;
|
}
|
||||||
gap: var(--Space-x2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.contactAddress,
|
.contactAddress,
|
||||||
.contactInformation {
|
.contactInformation {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Space-x1);
|
gap: var(--Space-x1);
|
||||||
|
justify-items: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contactAddress {
|
.contactAddress {
|
||||||
@@ -60,10 +50,25 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--Space-x15);
|
gap: var(--Space-x15);
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.localCharges::before {
|
||||||
|
content: " (";
|
||||||
|
}
|
||||||
|
|
||||||
|
.localCharges::after {
|
||||||
|
content: ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitleContent {
|
||||||
|
display: grid;
|
||||||
|
justify-items: start;
|
||||||
|
gap: var(--Space-x05);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
.divider {
|
.contactInformationDivider {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,6 +82,7 @@
|
|||||||
|
|
||||||
.phoneNumber {
|
.phoneNumber {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
gap: var(--Space-x1);
|
gap: var(--Space-x1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
import { cx } from "class-variance-authority"
|
import { cx } from "class-variance-authority"
|
||||||
import { useMemo, useRef, useState } from "react"
|
import { useMemo, useRef, useState } from "react"
|
||||||
|
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
|
||||||
|
|
||||||
import { Section } from "@/components/Section"
|
import { Section } from "@/components/Section"
|
||||||
|
import { SectionHeader } from "@/components/Section/Header"
|
||||||
import ShowMoreButton from "@/components/TempDesignSystem/ShowMoreButton"
|
import ShowMoreButton from "@/components/TempDesignSystem/ShowMoreButton"
|
||||||
|
|
||||||
import { RoomCard } from "./RoomCard"
|
import { RoomCard } from "./RoomCard"
|
||||||
@@ -34,16 +33,11 @@ export function Rooms({ heading, rooms, preamble }: RoomsProps) {
|
|||||||
return (
|
return (
|
||||||
<Section id={HotelHashValues.rooms} className={styles.roomsContainer}>
|
<Section id={HotelHashValues.rooms} className={styles.roomsContainer}>
|
||||||
<div ref={scrollRef} className={styles.scrollRef}></div>
|
<div ref={scrollRef} className={styles.scrollRef}></div>
|
||||||
<header className={styles.sectionHeader}>
|
<SectionHeader
|
||||||
<Typography variant="Title/md">
|
heading={heading}
|
||||||
<h2 className={styles.heading}>{heading}</h2>
|
typography="Title/md"
|
||||||
</Typography>
|
preamble={preamble}
|
||||||
{preamble && (
|
/>
|
||||||
<Typography variant="Body/Paragraph/mdRegular">
|
|
||||||
<p>{preamble}</p>
|
|
||||||
</Typography>
|
|
||||||
)}
|
|
||||||
</header>
|
|
||||||
<ul
|
<ul
|
||||||
className={cx(styles.roomsList, {
|
className={cx(styles.roomsList, {
|
||||||
[styles.allVisible]: allRoomsVisible,
|
[styles.allVisible]: allRoomsVisible,
|
||||||
@@ -58,6 +52,7 @@ export function Rooms({ heading, rooms, preamble }: RoomsProps) {
|
|||||||
|
|
||||||
{showToggleButton ? (
|
{showToggleButton ? (
|
||||||
<ShowMoreButton
|
<ShowMoreButton
|
||||||
|
className={styles.showMoreButton}
|
||||||
loadMoreData={handleShowMore}
|
loadMoreData={handleShowMore}
|
||||||
showLess={allRoomsVisible}
|
showLess={allRoomsVisible}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -4,16 +4,6 @@
|
|||||||
color: var(--Text-Default);
|
color: var(--Text-Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sectionHeader {
|
|
||||||
display: grid;
|
|
||||||
gap: var(--Space-x15);
|
|
||||||
max-width: var(--hotel-page-intro-section-width);
|
|
||||||
}
|
|
||||||
|
|
||||||
.heading {
|
|
||||||
color: var(--Text-Heading);
|
|
||||||
}
|
|
||||||
|
|
||||||
.scrollRef {
|
.scrollRef {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(-1 * var(--hotel-page-scroll-margin-top));
|
top: calc(-1 * var(--hotel-page-scroll-margin-top));
|
||||||
@@ -30,6 +20,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.showMoreButton {
|
||||||
|
justify-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.roomsList {
|
.roomsList {
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"contact socials"
|
"contact socials"
|
||||||
"email email"
|
"email email"
|
||||||
"ecoLabel ecoLabel";
|
"ecoLabel ecoLabel";
|
||||||
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address {
|
.address {
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
import NextLink from "next/link"
|
||||||
|
|
||||||
import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon"
|
import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon"
|
||||||
import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon"
|
import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import LocalCallCharges from "@/components/LocalCallCharges"
|
import LocalCallCharges from "@/components/LocalCallCharges"
|
||||||
@@ -34,117 +36,94 @@ export default async function ContactInformation({
|
|||||||
})}
|
})}
|
||||||
</h3>
|
</h3>
|
||||||
</Typography>
|
</Typography>
|
||||||
<div className={styles.information}>
|
<Typography variant="Body/Paragraph/mdBold">
|
||||||
<div className={styles.address}>
|
<address className={styles.information}>
|
||||||
<Typography variant="Body/Paragraph/mdBold">
|
<div className={styles.address}>
|
||||||
<p>
|
<p>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "common.address",
|
id: "common.address",
|
||||||
defaultMessage: "Address",
|
defaultMessage: "Address",
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</Typography>
|
<Typography variant="Body/Paragraph/mdRegular">
|
||||||
<Typography variant="Body/Paragraph/mdRegular">
|
<div>
|
||||||
<span>
|
<p>{hotelAddress.streetAddress}</p>
|
||||||
<p>{hotelAddress.streetAddress}</p>
|
<p>{hotelAddress.city}</p>
|
||||||
<p>{hotelAddress.city}</p>
|
</div>
|
||||||
</span>
|
</Typography>
|
||||||
</Typography>
|
</div>
|
||||||
</div>
|
<div className={styles.drivingDirections}>
|
||||||
<div className={styles.drivingDirections}>
|
|
||||||
<Typography variant="Body/Paragraph/mdBold">
|
|
||||||
<p>
|
<p>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "common.drivingDirections",
|
id: "common.drivingDirections",
|
||||||
defaultMessage: "Driving directions",
|
defaultMessage: "Driving directions",
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</Typography>
|
<TextLink href={directionsUrl} target="_blank">
|
||||||
<Link
|
{intl.formatMessage({
|
||||||
href={directionsUrl}
|
id: "common.googleMaps",
|
||||||
target="_blank"
|
defaultMessage: "Google Maps",
|
||||||
color="Text/Interactive/Secondary"
|
})}
|
||||||
textDecoration="underline"
|
</TextLink>
|
||||||
>
|
</div>
|
||||||
{intl.formatMessage({
|
<div className={styles.contact}>
|
||||||
id: "common.googleMaps",
|
|
||||||
defaultMessage: "Google Maps",
|
|
||||||
})}
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
<div className={styles.contact}>
|
|
||||||
<Typography variant="Body/Paragraph/mdBold">
|
|
||||||
<p>
|
<p>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "common.contactUs",
|
id: "common.contactUs",
|
||||||
defaultMessage: "Contact us",
|
defaultMessage: "Contact us",
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</Typography>
|
<TextLink href={`tel:+${contact.phoneNumber}`}>
|
||||||
<Link
|
{contact.phoneNumber}
|
||||||
href={`tel:+${contact.phoneNumber}`}
|
</TextLink>
|
||||||
color="Text/Interactive/Secondary"
|
<LocalCallCharges country={hotelAddress.country} />
|
||||||
textDecoration="underline"
|
</div>
|
||||||
>
|
{socials.instagram || socials.facebook ? (
|
||||||
{contact.phoneNumber}
|
<div className={styles.socials}>
|
||||||
</Link>
|
|
||||||
<LocalCallCharges country={hotelAddress.country} />
|
|
||||||
</div>
|
|
||||||
{socials.instagram || socials.facebook ? (
|
|
||||||
<div className={styles.socials}>
|
|
||||||
<Typography variant="Body/Paragraph/mdBold">
|
|
||||||
<p>
|
<p>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "common.followUs",
|
id: "common.followUs",
|
||||||
defaultMessage: "Follow us",
|
defaultMessage: "Follow us",
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</Typography>
|
<div className={styles.socialIcons}>
|
||||||
<div className={styles.socialIcons}>
|
{socials.instagram && (
|
||||||
{socials.instagram && (
|
<NextLink href={socials.instagram}>
|
||||||
<Link href={socials.instagram}>
|
<InstagramIcon color="Icon/Interactive/Default" />
|
||||||
<InstagramIcon color="Icon/Interactive/Default" />
|
</NextLink>
|
||||||
</Link>
|
)}
|
||||||
)}
|
{socials.facebook && (
|
||||||
{socials.facebook && (
|
<NextLink href={socials.facebook}>
|
||||||
<Link href={socials.facebook}>
|
<FacebookIcon color="Icon/Interactive/Default" />
|
||||||
<FacebookIcon color="Icon/Interactive/Default" />
|
</NextLink>
|
||||||
</Link>
|
)}
|
||||||
)}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
) : null}
|
||||||
) : null}
|
<div className={styles.email}>
|
||||||
<div className={styles.email}>
|
|
||||||
<Typography variant="Body/Paragraph/mdBold">
|
|
||||||
<p>
|
<p>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "common.email",
|
id: "common.email",
|
||||||
defaultMessage: "Email",
|
defaultMessage: "Email",
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</Typography>
|
<TextLink href={`mailto:${contact.email}`}>
|
||||||
<Link
|
{contact.email}
|
||||||
href={`mailto:${contact.email}`}
|
</TextLink>
|
||||||
color="Text/Interactive/Secondary"
|
</div>
|
||||||
textDecoration="underline"
|
{ecoLabels.nordicEcoLabel && (
|
||||||
>
|
<div className={styles.ecoLabel}>
|
||||||
{contact.email}
|
<Image
|
||||||
</Link>
|
height={38}
|
||||||
</div>
|
width={38}
|
||||||
{ecoLabels.nordicEcoLabel && (
|
alt={intl.formatMessage({
|
||||||
<div className={styles.ecoLabel}>
|
id: "common.nordicSwanEcolabel",
|
||||||
<Image
|
defaultMessage: "Nordic Swan Ecolabel",
|
||||||
height={38}
|
})}
|
||||||
width={38}
|
src={`/_static/shared/icons/swan-eco/swan_eco_dark_${lang}.png`}
|
||||||
alt={intl.formatMessage({
|
/>
|
||||||
id: "common.nordicSwanEcolabel",
|
|
||||||
defaultMessage: "Nordic Swan Ecolabel",
|
|
||||||
})}
|
|
||||||
src={`/_static/shared/icons/swan-eco/swan_eco_dark_${lang}.png`}
|
|
||||||
/>
|
|
||||||
<div>
|
|
||||||
<Typography variant="Body/Supporting text (caption)/smRegular">
|
<Typography variant="Body/Supporting text (caption)/smRegular">
|
||||||
<span>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "common.nordicSwanEcolabel",
|
id: "common.nordicSwanEcolabel",
|
||||||
@@ -152,12 +131,12 @@ export default async function ContactInformation({
|
|||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
<p>{ecoLabels.svanenEcoLabelCertificateNumber}</p>
|
<p>{ecoLabels.svanenEcoLabelCertificateNumber}</p>
|
||||||
</span>
|
</div>
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
</address>
|
||||||
</div>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.buttonContainer {
|
.buttonContainer {
|
||||||
background-color: var(--Background-Primary);
|
background-color: var(--Background-Primary);
|
||||||
border-top: 1px solid var(--Base-Border-Subtle);
|
border-top: 1px solid var(--Border-Default);
|
||||||
padding: var(--Spacing-x4) var(--Spacing-x2);
|
padding: var(--Space-x4) var(--Space-x2);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import Link from "@scandic-hotels/design-system/Link"
|
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
|
||||||
import Preamble from "@scandic-hotels/design-system/Preamble"
|
|
||||||
import SidePeek from "@scandic-hotels/design-system/SidePeek"
|
import SidePeek from "@scandic-hotels/design-system/SidePeek"
|
||||||
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
|
|
||||||
@@ -28,13 +27,19 @@ export default async function ActivitiesSidePeek({
|
|||||||
defaultMessage: "Close",
|
defaultMessage: "Close",
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Preamble>{preamble}</Preamble>
|
<Typography variant="Body/Lead text">
|
||||||
|
<p>{preamble}</p>
|
||||||
|
</Typography>
|
||||||
<div className={styles.buttonContainer}>
|
<div className={styles.buttonContainer}>
|
||||||
<Button theme="base" intent="secondary" asChild>
|
<ButtonLink
|
||||||
<Link href={href} weight="bold">
|
href={href}
|
||||||
{sidepeekCTA}
|
variant="Secondary"
|
||||||
</Link>
|
color="Primary"
|
||||||
</Button>
|
size="Medium"
|
||||||
|
typography="Body/Paragraph/mdBold"
|
||||||
|
>
|
||||||
|
{sidepeekCTA}
|
||||||
|
</ButtonLink>
|
||||||
</div>
|
</div>
|
||||||
</SidePeek>
|
</SidePeek>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -47,17 +47,16 @@ export default async function MeetingsAndConferencesSidePeek({
|
|||||||
<SidePeekImages images={visibleImages} />
|
<SidePeekImages images={visibleImages} />
|
||||||
) : null}
|
) : null}
|
||||||
{descriptions?.medium && (
|
{descriptions?.medium && (
|
||||||
<Typography>
|
<Typography variant="Body/Paragraph/mdRegular">
|
||||||
<p>{descriptions.medium}</p>
|
<p>{descriptions.medium}</p>
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{roomText || seatingText ? (
|
{roomText || seatingText ? (
|
||||||
<Typography className={styles.capacityDetails}>
|
<Typography variant="Body/Paragraph/mdRegular">
|
||||||
<span>
|
<div className={styles.capacityDetails}>
|
||||||
{roomText}
|
{roomText ? <span>{roomText}</span> : null}
|
||||||
{roomText && seatingText && <br />}
|
{seatingText ? <span>{seatingText}</span> : null}
|
||||||
{seatingText}
|
</div>
|
||||||
</span>
|
|
||||||
</Typography>
|
</Typography>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
.wrapper {
|
.wrapper {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Spacing-x3);
|
gap: var(--Space-x3);
|
||||||
margin-bottom: calc(
|
margin-bottom: calc(
|
||||||
var(--Spacing-x4) * 2 + 80px
|
var(--Space-x4) * 2 + 80px
|
||||||
); /* Creates space between the wrapper and buttonContainer */
|
); /* Creates space between the wrapper and buttonContainer */
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttonContainer {
|
.buttonContainer {
|
||||||
background-color: var(--Background-Primary);
|
background-color: var(--Background-Primary);
|
||||||
border-top: 1px solid var(--Base-Border-Subtle);
|
border-top: 1px solid var(--Border-Default);
|
||||||
padding: var(--Spacing-x4) var(--Spacing-x2);
|
padding: var(--Space-x4) var(--Space-x2);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -17,5 +17,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.capacityDetails {
|
.capacityDetails {
|
||||||
|
display: grid;
|
||||||
color: var(--Text-Secondary);
|
color: var(--Text-Secondary);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import OpeningHours from "@scandic-hotels/design-system/OpeningHours"
|
import OpeningHours from "@scandic-hotels/design-system/OpeningHours"
|
||||||
|
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
@@ -81,20 +81,14 @@ export default async function RestaurantBarItem({
|
|||||||
<ul className={styles.menuList}>
|
<ul className={styles.menuList}>
|
||||||
{menus.map(({ name, url }) => (
|
{menus.map(({ name, url }) => (
|
||||||
<li key={name}>
|
<li key={name}>
|
||||||
<Link
|
<TextLink href={url} target="_blank">
|
||||||
href={url}
|
|
||||||
target="_blank"
|
|
||||||
textDecoration="underline"
|
|
||||||
variant="icon"
|
|
||||||
color="Text/Interactive/Secondary"
|
|
||||||
>
|
|
||||||
{name}
|
{name}
|
||||||
<MaterialIcon
|
<MaterialIcon
|
||||||
icon="open_in_new"
|
icon="open_in_new"
|
||||||
size={20}
|
size={24}
|
||||||
color="CurrentColor"
|
color="CurrentColor"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</TextLink>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
.content {
|
.content {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Spacing-x4);
|
gap: var(--Space-x4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.item:not(:last-child) {
|
.item:not(:last-child) {
|
||||||
border-bottom: 1px solid var(--Base-Border-Subtle);
|
border-bottom: 1px solid var(--Border-Default);
|
||||||
padding-bottom: var(--Spacing-x4);
|
padding-bottom: var(--Space-x4);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--Spacing-x1);
|
gap: var(--Space-x1);
|
||||||
margin-bottom: var(--Spacing-x-half);
|
margin-bottom: var(--Space-x05);
|
||||||
align-items: self-start;
|
align-items: self-start;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
color: var(--Text-Secondary);
|
color: var(--Text-Secondary);
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.facilities {
|
.facilities {
|
||||||
column-count: 2;
|
column-count: 2;
|
||||||
column-gap: var(--Spacing-x2);
|
column-gap: var(--Space-x2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctaWrapper {
|
.ctaWrapper {
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
.content {
|
.content {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Spacing-x2);
|
gap: var(--Space-x2);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: calc(
|
margin-bottom: calc(
|
||||||
var(--Spacing-x4) * 2 + 80px
|
var(--Space-x4) * 2 + 80px
|
||||||
); /* Creates space between the wrapper and buttonContainer */
|
); /* Creates space between the wrapper and buttonContainer */
|
||||||
}
|
}
|
||||||
|
|
||||||
.innerContent {
|
.innerContent {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Spacing-x-one-and-half);
|
gap: var(--Space-x15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.guests {
|
.guests {
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
.buttonContainer {
|
.buttonContainer {
|
||||||
background-color: var(--Background-Primary);
|
background-color: var(--Background-Primary);
|
||||||
border-top: 1px solid var(--Base-Border-Subtle);
|
border-top: 1px solid var(--Border-Default);
|
||||||
padding: var(--Spacing-x4) var(--Spacing-x2);
|
padding: var(--Space-x4) var(--Space-x2);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.wrapper {
|
.wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--Spacing-x4);
|
gap: var(--Space-x4);
|
||||||
|
|
||||||
/* Creates space between the wrapper and buttonContainer depending on which buttons are present */
|
/* Creates space between the wrapper and buttonContainer depending on which buttons are present */
|
||||||
&.hasSpaPage,
|
&.hasSpaPage,
|
||||||
@@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
.buttonContainer {
|
.buttonContainer {
|
||||||
background-color: var(--Background-Primary);
|
background-color: var(--Background-Primary);
|
||||||
border-top: 1px solid var(--Base-Border-Subtle);
|
border-top: 1px solid var(--Border-Default);
|
||||||
padding: var(--Spacing-x4) var(--Spacing-x2);
|
padding: var(--Space-x4) var(--Space-x2);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Spacing-x2);
|
gap: var(--Space-x2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,13 @@ import { HotelHashValues } from "@/types/enums/hotelPage"
|
|||||||
|
|
||||||
interface TabNavigationProps {
|
interface TabNavigationProps {
|
||||||
pageSections: HotelPageSections
|
pageSections: HotelPageSections
|
||||||
|
isThemed: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function TabNavigation({ pageSections }: TabNavigationProps) {
|
export default function TabNavigation({
|
||||||
|
pageSections,
|
||||||
|
isThemed,
|
||||||
|
}: TabNavigationProps) {
|
||||||
const [activeHash, setActiveHash] = useState<string>()
|
const [activeHash, setActiveHash] = useState<string>()
|
||||||
const tabNavigationRef = useRef<HTMLDivElement>(null)
|
const tabNavigationRef = useRef<HTMLDivElement>(null)
|
||||||
const tabRefs = useMemo(() => new Map<string, HTMLAnchorElement>(), [])
|
const tabRefs = useMemo(() => new Map<string, HTMLAnchorElement>(), [])
|
||||||
@@ -94,6 +98,7 @@ export default function TabNavigation({ pageSections }: TabNavigationProps) {
|
|||||||
<div
|
<div
|
||||||
ref={tabNavigationRef}
|
ref={tabNavigationRef}
|
||||||
className={cx(styles.containerWrapper, {
|
className={cx(styles.containerWrapper, {
|
||||||
|
[styles.isThemed]: isThemed,
|
||||||
[styles.showLeftShadow]: showLeftShadow,
|
[styles.showLeftShadow]: showLeftShadow,
|
||||||
[styles.showRightShadow]: showRightShadow,
|
[styles.showRightShadow]: showRightShadow,
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: var(--hotel-tab-navigation-z-index);
|
z-index: var(--hotel-tab-navigation-z-index);
|
||||||
background-color: var(--Surface-Secondary-Default);
|
background-color: var(--Background-Primary);
|
||||||
border-bottom: 1px solid var(--Border-Default);
|
border-bottom: 1px solid var(--Border-Default);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
--gradient-color: var(--Background-Primary);
|
||||||
|
|
||||||
&::before,
|
&::before,
|
||||||
&::after {
|
&::after {
|
||||||
@@ -23,16 +24,16 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
-90deg,
|
-90deg,
|
||||||
rgba(242, 236, 230, 0.1) 6%,
|
color-mix(in srgb, var(--gradient-color) 10%, transparent) 6%,
|
||||||
rgba(242, 236, 230, 1) 90%
|
var(--gradient-color) 90%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
&::after {
|
&::after {
|
||||||
right: 0;
|
right: 0;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
rgba(242, 236, 230, 0.1) 6%,
|
color-mix(in srgb, var(--gradient-color) 10%, transparent) 6%,
|
||||||
rgba(242, 236, 230, 1) 90%
|
var(--gradient-color) 90%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +70,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 767px) {
|
||||||
|
.containerWrapper.isThemed {
|
||||||
|
background-color: var(--Surface-Brand-Primary-1-Default);
|
||||||
|
--gradient-color: var(--Surface-Brand-Primary-1-Default);
|
||||||
|
|
||||||
|
.link {
|
||||||
|
color: var(--Text-Brand-OnPrimary-1-Default);
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&.active {
|
||||||
|
border-bottom-color: var(--Text-Brand-OnPrimary-1-Default);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1367px) {
|
@media screen and (min-width: 1367px) {
|
||||||
.tabsContainer {
|
.tabsContainer {
|
||||||
padding: 0 var(--Space-x5);
|
padding: 0 var(--Space-x5);
|
||||||
|
|||||||
@@ -20,16 +20,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
background-color: var(--Base-Surface-Subtle-Normal);
|
background-color: var(--Background-Primary);
|
||||||
grid-area: header;
|
grid-area: header;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainSection {
|
.mainSection {
|
||||||
grid-area: mainSection;
|
grid-area: mainSection;
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(
|
gap: var(--Space-x9);
|
||||||
--Spacing-x9
|
|
||||||
); /* var(--Space-x9) does not exist in the design system, hence the "old" variable */
|
|
||||||
padding: var(--Space-x4) 0;
|
padding: var(--Space-x4) 0;
|
||||||
width: var(--max-width-page);
|
width: var(--max-width-page);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@@ -57,6 +55,12 @@
|
|||||||
gap: var(--Space-x2);
|
gap: var(--Space-x2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 767px) {
|
||||||
|
.header.isThemed {
|
||||||
|
background-color: var(--Surface-Brand-Primary-1-Default);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.pageContainer {
|
.pageContainer {
|
||||||
--hotel-page-scroll-margin-top: calc(
|
--hotel-page-scroll-margin-top: calc(
|
||||||
@@ -95,7 +99,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: var(--Base-Surface-Primary-light-Normal);
|
background-color: var(--Surface-Primary-Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pageContainer > nav {
|
.pageContainer > nav {
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
|
import { cx } from "class-variance-authority"
|
||||||
|
import NextLink from "next/link"
|
||||||
import { notFound } from "next/navigation"
|
import { notFound } from "next/navigation"
|
||||||
import { Suspense } from "react"
|
import { Suspense } from "react"
|
||||||
|
|
||||||
import { dt } from "@scandic-hotels/common/dt"
|
import { dt } from "@scandic-hotels/common/dt"
|
||||||
import { safeTry } from "@scandic-hotels/common/utils/safeTry"
|
import { safeTry } from "@scandic-hotels/common/utils/safeTry"
|
||||||
import { Alert } from "@scandic-hotels/design-system/Alert"
|
import { Alert } from "@scandic-hotels/design-system/Alert"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { TrackingSDK } from "@scandic-hotels/tracking/TrackingSDK"
|
import { TrackingSDK } from "@scandic-hotels/tracking/TrackingSDK"
|
||||||
import { type HotelPageData } from "@scandic-hotels/trpc/types/hotelPage"
|
import { type HotelPageData } from "@scandic-hotels/trpc/types/hotelPage"
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@ import { getIntl } from "@/i18n"
|
|||||||
import { getLang } from "@/i18n/serverContext"
|
import { getLang } from "@/i18n/serverContext"
|
||||||
import { setFacilityCards } from "@/utils/facilityCards"
|
import { setFacilityCards } from "@/utils/facilityCards"
|
||||||
import { generateHotelSchema } from "@/utils/jsonSchemas"
|
import { generateHotelSchema } from "@/utils/jsonSchemas"
|
||||||
|
import { Theme } from "@/utils/theme/types"
|
||||||
|
|
||||||
import MapCard from "./Map/MapCard"
|
import MapCard from "./Map/MapCard"
|
||||||
import MapWithCardWrapper from "./Map/MapWithCard"
|
import MapWithCardWrapper from "./Map/MapWithCard"
|
||||||
@@ -57,11 +59,13 @@ import { HotelHashValues } from "@/types/enums/hotelPage"
|
|||||||
interface HotelPageProps {
|
interface HotelPageProps {
|
||||||
hotelData: HotelData
|
hotelData: HotelData
|
||||||
hotelPageData: HotelPageData
|
hotelPageData: HotelPageData
|
||||||
|
theme: Theme
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function HotelPage({
|
export default async function HotelPage({
|
||||||
hotelData,
|
hotelData,
|
||||||
hotelPageData,
|
hotelPageData,
|
||||||
|
theme,
|
||||||
}: HotelPageProps) {
|
}: HotelPageProps) {
|
||||||
const lang = await getLang()
|
const lang = await getLang()
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
@@ -147,6 +151,8 @@ export default async function HotelPage({
|
|||||||
)
|
)
|
||||||
const trackingHotelData = getTrackingHotelData(hotelData.hotel)
|
const trackingHotelData = getTrackingHotelData(hotelData.hotel)
|
||||||
|
|
||||||
|
const isThemed = theme !== Theme.scandic
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.pageContainer}>
|
<div className={styles.pageContainer}>
|
||||||
<script
|
<script
|
||||||
@@ -155,15 +161,22 @@ export default async function HotelPage({
|
|||||||
__html: JSON.stringify(jsonSchema.jsonLd),
|
__html: JSON.stringify(jsonSchema.jsonLd),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<header className={styles.header}>
|
<header
|
||||||
|
className={cx(styles.header, {
|
||||||
|
[styles.isThemed]: isThemed,
|
||||||
|
})}
|
||||||
|
>
|
||||||
<Suspense fallback={<BreadcrumbsSkeleton size="headerWidth" />}>
|
<Suspense fallback={<BreadcrumbsSkeleton size="headerWidth" />}>
|
||||||
<Breadcrumbs size="headerWidth" />
|
<Breadcrumbs
|
||||||
|
size="headerWidth"
|
||||||
|
isThemed={isThemed ? "mobileOnly" : undefined}
|
||||||
|
/>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
{images?.length ? (
|
{images?.length ? (
|
||||||
<PreviewImages images={images} hotelName={name} />
|
<PreviewImages images={images} hotelName={name} />
|
||||||
) : null}
|
) : null}
|
||||||
</header>
|
</header>
|
||||||
<TabNavigation pageSections={pageSections} />
|
<TabNavigation isThemed={isThemed} pageSections={pageSections} />
|
||||||
|
|
||||||
<main className={styles.mainSection}>
|
<main className={styles.mainSection}>
|
||||||
<div id={HotelHashValues.overview} className={styles.overview}>
|
<div id={HotelHashValues.overview} className={styles.overview}>
|
||||||
@@ -175,6 +188,7 @@ export default async function HotelPage({
|
|||||||
address={address}
|
address={address}
|
||||||
tripAdvisor={ratings?.tripAdvisor}
|
tripAdvisor={ratings?.tripAdvisor}
|
||||||
contactInformation={contactInformation}
|
contactInformation={contactInformation}
|
||||||
|
isThemed={isThemed}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AmenitiesList detailedFacilities={detailedFacilities} />
|
<AmenitiesList detailedFacilities={detailedFacilities} />
|
||||||
@@ -232,14 +246,14 @@ export default async function HotelPage({
|
|||||||
</main>
|
</main>
|
||||||
<aside className={styles.mapContainer}>
|
<aside className={styles.mapContainer}>
|
||||||
<MapWithCardWrapper>
|
<MapWithCardWrapper>
|
||||||
<Link href="?view=map" keepSearchParams>
|
<NextLink href="?view=map">
|
||||||
<StaticMap
|
<StaticMap
|
||||||
coordinates={coordinates}
|
coordinates={coordinates}
|
||||||
hotelName={name}
|
hotelName={name}
|
||||||
address={address}
|
address={address}
|
||||||
markerInfo={{ hotelType: hotelType as HotelType, hotelId }} // TODO: Update hotel attributes schema instead
|
markerInfo={{ hotelType: hotelType as HotelType, hotelId }} // TODO: Update hotel attributes schema instead
|
||||||
/>
|
/>
|
||||||
</Link>
|
</NextLink>
|
||||||
<MapCard
|
<MapCard
|
||||||
hotelName={name}
|
hotelName={name}
|
||||||
pois={getFilteredSlicedPois(pointsOfInterest)}
|
pois={getFilteredSlicedPois(pointsOfInterest)}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { ElementType } from "domelementtype"
|
import { ElementType } from "domelementtype"
|
||||||
import parse, { type DOMNode, Element, type Text } from "html-react-parser"
|
import parse, { type DOMNode, Element, type Text } from "html-react-parser"
|
||||||
|
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Table from "@scandic-hotels/design-system/Table"
|
import Table from "@scandic-hotels/design-system/Table"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import LocalCallCharges from "@/components/LocalCallCharges"
|
import LocalCallCharges from "@/components/LocalCallCharges"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import LocalCallCharges from "@/components/LocalCallCharges"
|
import LocalCallCharges from "@/components/LocalCallCharges"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import OpeningHours from "@scandic-hotels/design-system/OpeningHours"
|
import OpeningHours from "@scandic-hotels/design-system/OpeningHours"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import LocalCallCharges from "@/components/LocalCallCharges"
|
import LocalCallCharges from "@/components/LocalCallCharges"
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { useIntl } from "react-intl"
|
|||||||
|
|
||||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import Modal from "@scandic-hotels/design-system/Modal"
|
import Modal from "@scandic-hotels/design-system/Modal"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { supportEmail, supportPhone } from "@/constants/contactSupport"
|
import { supportEmail, supportPhone } from "@/constants/contactSupport"
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import {
|
|||||||
} from "react-aria-components"
|
} from "react-aria-components"
|
||||||
|
|
||||||
import Body from "@scandic-hotels/design-system/Body"
|
import Body from "@scandic-hotels/design-system/Body"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { LoadingSpinner } from "@scandic-hotels/design-system/LoadingSpinner"
|
import { LoadingSpinner } from "@scandic-hotels/design-system/LoadingSpinner"
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
|
|
||||||
import styles from "./dialog.module.css"
|
import styles from "./dialog.module.css"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
|||||||
import CountrySelect from "@scandic-hotels/design-system/Form/Country"
|
import CountrySelect from "@scandic-hotels/design-system/Form/Country"
|
||||||
import DateSelect from "@scandic-hotels/design-system/Form/Date"
|
import DateSelect from "@scandic-hotels/design-system/Form/Date"
|
||||||
import Phone from "@scandic-hotels/design-system/Form/Phone"
|
import Phone from "@scandic-hotels/design-system/Form/Phone"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { toast } from "@scandic-hotels/design-system/Toast"
|
import { toast } from "@scandic-hotels/design-system/Toast"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { useFormTracking } from "@scandic-hotels/tracking/useFormTracking"
|
import { useFormTracking } from "@scandic-hotels/tracking/useFormTracking"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { logout } from "@scandic-hotels/common/constants/routes/handleAuth"
|
|||||||
import Caption from "@scandic-hotels/design-system/Caption"
|
import Caption from "@scandic-hotels/design-system/Caption"
|
||||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
import { trpc } from "@scandic-hotels/trpc/client"
|
import { trpc } from "@scandic-hotels/trpc/client"
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import FocusLock from "react-focus-lock"
|
import FocusLock from "react-focus-lock"
|
||||||
|
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import useDropdownStore from "@/stores/main-menu"
|
import useDropdownStore from "@/stores/main-menu"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { useRef } from "react"
|
import { useRef } from "react"
|
||||||
|
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import useDropdownStore from "@/stores/main-menu"
|
import useDropdownStore from "@/stores/main-menu"
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
|||||||
import { logger } from "@scandic-hotels/common/logger"
|
import { logger } from "@scandic-hotels/common/logger"
|
||||||
import Body from "@scandic-hotels/design-system/Body"
|
import Body from "@scandic-hotels/design-system/Body"
|
||||||
import Caption from "@scandic-hotels/design-system/Caption"
|
import Caption from "@scandic-hotels/design-system/Caption"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Title from "@scandic-hotels/design-system/Title"
|
import Title from "@scandic-hotels/design-system/Title"
|
||||||
import { toast } from "@scandic-hotels/design-system/Toast"
|
import { toast } from "@scandic-hotels/design-system/Toast"
|
||||||
import { trpc } from "@scandic-hotels/trpc/client"
|
import { trpc } from "@scandic-hotels/trpc/client"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { PaymentOption } from "@scandic-hotels/design-system/Form/PaymentOption"
|
|||||||
import { PaymentOptionsGroup } from "@scandic-hotels/design-system/Form/PaymentOptionsGroup"
|
import { PaymentOptionsGroup } from "@scandic-hotels/design-system/Form/PaymentOptionsGroup"
|
||||||
import { SelectPaymentMethod } from "@scandic-hotels/design-system/Form/SelectPaymentMethod"
|
import { SelectPaymentMethod } from "@scandic-hotels/design-system/Form/SelectPaymentMethod"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow"
|
import { useAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import styles from "./summaryCard.module.css"
|
import styles from "./summaryCard.module.css"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import styles from "./promo.module.css"
|
import styles from "./promo.module.css"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { usePathname } from "next/navigation"
|
import { usePathname } from "next/navigation"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import { isWebview } from "@/constants/routes/webviews"
|
import { isWebview } from "@/constants/routes/webviews"
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
|||||||
import { PaymentOption } from "@scandic-hotels/design-system/Form/PaymentOption"
|
import { PaymentOption } from "@scandic-hotels/design-system/Form/PaymentOption"
|
||||||
import { PaymentOptionsGroup } from "@scandic-hotels/design-system/Form/PaymentOptionsGroup"
|
import { PaymentOptionsGroup } from "@scandic-hotels/design-system/Form/PaymentOptionsGroup"
|
||||||
import { SelectPaymentMethod } from "@scandic-hotels/design-system/Form/SelectPaymentMethod"
|
import { SelectPaymentMethod } from "@scandic-hotels/design-system/Form/SelectPaymentMethod"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { LoadingSpinner } from "@scandic-hotels/design-system/LoadingSpinner"
|
import { LoadingSpinner } from "@scandic-hotels/design-system/LoadingSpinner"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { toast } from "@scandic-hotels/design-system/Toast"
|
import { toast } from "@scandic-hotels/design-system/Toast"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { trackGlaSaveCardAttempt } from "@scandic-hotels/tracking/payment"
|
import { trackGlaSaveCardAttempt } from "@scandic-hotels/tracking/payment"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useIntl } from "react-intl"
|
|||||||
import { CancellationRuleEnum } from "@scandic-hotels/common/constants/booking"
|
import { CancellationRuleEnum } from "@scandic-hotels/common/constants/booking"
|
||||||
import { preliminaryReceipt } from "@scandic-hotels/common/constants/routes/myStay"
|
import { preliminaryReceipt } from "@scandic-hotels/common/constants/routes/myStay"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useMyStayStore } from "@/stores/my-stay"
|
import { useMyStayStore } from "@/stores/my-stay"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { useIntl } from "react-intl"
|
|||||||
|
|
||||||
import { languages } from "@scandic-hotels/common/constants/language"
|
import { languages } from "@scandic-hotels/common/constants/language"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import { useIntl } from "react-intl"
|
|||||||
import { dt } from "@scandic-hotels/common/dt"
|
import { dt } from "@scandic-hotels/common/dt"
|
||||||
import { IconButton } from "@scandic-hotels/design-system/IconButton" // client only
|
import { IconButton } from "@scandic-hotels/design-system/IconButton" // client only
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import Modal from "@scandic-hotels/design-system/Modal"
|
import Modal from "@scandic-hotels/design-system/Modal"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { compareAllLevels, faq } from "@/constants/webHrefs"
|
import { compareAllLevels, faq } from "@/constants/webHrefs"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import styles from "./changeNameDisclaimer.module.css"
|
import styles from "./changeNameDisclaimer.module.css"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Body from "@scandic-hotels/design-system/Body"
|
import Body from "@scandic-hotels/design-system/Body"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { getMembershipCards } from "@/lib/trpc/memoizedRequests"
|
import { getMembershipCards } from "@/lib/trpc/memoizedRequests"
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
import { AnimatePresence, motion } from "motion/react"
|
import { AnimatePresence, motion } from "motion/react"
|
||||||
import { usePathname } from "next/navigation"
|
import { usePathname } from "next/navigation"
|
||||||
import React, { useState } from "react"
|
import { useState } from "react"
|
||||||
import { Dialog, Modal, ModalOverlay } from "react-aria-components"
|
import { Dialog, Modal, ModalOverlay } from "react-aria-components"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { customerService } from "@scandic-hotels/common/constants/routes/customerService"
|
import { customerService } from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
import { benefits } from "@scandic-hotels/common/constants/routes/myPages"
|
import { benefits } from "@scandic-hotels/common/constants/routes/myPages"
|
||||||
import { logger } from "@scandic-hotels/common/logger"
|
import { logger } from "@scandic-hotels/common/logger"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { toast } from "@scandic-hotels/design-system/Toast"
|
import { toast } from "@scandic-hotels/design-system/Toast"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { trpc } from "@scandic-hotels/trpc/client"
|
import { trpc } from "@scandic-hotels/trpc/client"
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import Body from "@scandic-hotels/design-system/Body"
|
|||||||
import Caption from "@scandic-hotels/design-system/Caption"
|
import Caption from "@scandic-hotels/design-system/Caption"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import { JsonToHtml } from "@scandic-hotels/design-system/JsonToHtml"
|
import { JsonToHtml } from "@scandic-hotels/design-system/JsonToHtml"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
import Title from "@scandic-hotels/design-system/Title"
|
import Title from "@scandic-hotels/design-system/Title"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import { linkVariants } from "./variants"
|
import { linkVariants } from "./variants"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
MaterialIcon,
|
MaterialIcon,
|
||||||
type MaterialIconSetIconProps,
|
type MaterialIconSetIconProps,
|
||||||
} from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
} from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { getValueFromContactConfig } from "@scandic-hotels/trpc/utils/contactConfig"
|
import { getValueFromContactConfig } from "@scandic-hotels/trpc/utils/contactConfig"
|
||||||
|
|
||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
|
|
||||||
import { faq } from "@/constants/webHrefs"
|
import { faq } from "@/constants/webHrefs"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { cx } from "class-variance-authority"
|
import { cx } from "class-variance-authority"
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
import { Breadcrumb as AriaBreadcrumb } from "react-aria-components"
|
import { Breadcrumb as BreadcrumbRAC } from "react-aria-components"
|
||||||
|
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
@@ -16,7 +16,7 @@ export function Breadcrumb({
|
|||||||
...props
|
...props
|
||||||
}: BreadcrumbProps) {
|
}: BreadcrumbProps) {
|
||||||
return (
|
return (
|
||||||
<AriaBreadcrumb className={cx(styles.listItem, className)} {...props}>
|
<BreadcrumbRAC className={cx(styles.listItem, className)} {...props}>
|
||||||
{href ? (
|
{href ? (
|
||||||
<>
|
<>
|
||||||
<Typography variant="Label/xsRegular">
|
<Typography variant="Label/xsRegular">
|
||||||
@@ -28,12 +28,12 @@ export function Breadcrumb({
|
|||||||
icon="chevron_right"
|
icon="chevron_right"
|
||||||
size={20}
|
size={20}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
color="Icon/Interactive/Secondary"
|
color="CurrentColor"
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
children
|
children
|
||||||
)}
|
)}
|
||||||
</AriaBreadcrumb>
|
</BreadcrumbRAC>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
.breadcrumbs {
|
.breadcrumbs {
|
||||||
padding: var(--Spacing-x4) 0 var(--Spacing-x3);
|
padding: var(--Space-x4) 0 var(--Space-x3);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
color: var(--Text-Interactive-Secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumbs.transparent {
|
.breadcrumbs.transparent {
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
|
|
||||||
.breadcrumbs .list {
|
.breadcrumbs .list {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--Spacing-x-quarter);
|
gap: var(--Space-x025);
|
||||||
padding-inline-start: 0;
|
padding-inline-start: 0;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
.listItem {
|
.listItem {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--Spacing-x-quarter);
|
gap: var(--Space-x025);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
}
|
}
|
||||||
@@ -64,24 +65,31 @@
|
|||||||
/* this increases the width of the button for tapping */
|
/* this increases the width of the button for tapping */
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
margin: 0 -5px;
|
margin: 0 -5px;
|
||||||
color: var(--Base-Text-High-contrast);
|
color: var(--Text-Interactive-Default);
|
||||||
|
|
||||||
|
&.button:not(.lastBreadcrumb) {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--Text-Interactive-Default-Hover);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
color: var(--Text-Interactive-Secondary);
|
color: var(--Text-Interactive-Secondary);
|
||||||
}
|
|
||||||
|
|
||||||
.link:hover,
|
&:hover {
|
||||||
.button:hover {
|
color: var(--Text-Interactive-Secondary-Hover);
|
||||||
color: var(--Text-Interactive-Secondary-Hover);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog {
|
.dialog {
|
||||||
background-color: var(--Base-Surface-Primary-light-Normal);
|
background-color: var(--Surface-Primary-Default);
|
||||||
padding: var(--Spacing-x1);
|
padding: var(--Space-x1);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--Spacing-x-half);
|
gap: var(--Space-x05);
|
||||||
border-radius: var(--Corner-radius-md);
|
border-radius: var(--Corner-radius-md);
|
||||||
min-width: 169px;
|
min-width: 169px;
|
||||||
outline: none;
|
outline: none;
|
||||||
@@ -91,16 +99,16 @@
|
|||||||
.dialogLink {
|
.dialogLink {
|
||||||
display: block;
|
display: block;
|
||||||
border-radius: var(--Corner-radius-md);
|
border-radius: var(--Corner-radius-md);
|
||||||
padding: var(--Spacing-x1);
|
padding: var(--Space-x1);
|
||||||
color: var(--Text-Default);
|
color: var(--Text-Default);
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background-color: var(--Surface-Primary-Hover);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialogLink:focus,
|
.lastBreadcrumb {
|
||||||
.dialogLink:hover {
|
|
||||||
background-color: var(--Base-Surface-Primary-light-Hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltipTrigger {
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -109,23 +117,57 @@
|
|||||||
|
|
||||||
.tooltip {
|
.tooltip {
|
||||||
background-color: var(--Surface-UI-Fill-Intense);
|
background-color: var(--Surface-UI-Fill-Intense);
|
||||||
padding: var(--Spacing-x-half) var(--Spacing-x1);
|
padding: var(--Space-x05) var(--Space-x1);
|
||||||
border-radius: var(--Corner-radius-sm);
|
border-radius: var(--Corner-radius-sm);
|
||||||
color: var(--Text-Inverted);
|
color: var(--Text-Inverted);
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (width <= 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
.desktop {
|
.desktop {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.breadcrumbs.isThemedMobile {
|
||||||
|
background-color: var(--Surface-Brand-Primary-1-Default);
|
||||||
|
color: var(--Text-Brand-OnPrimary-1-Default);
|
||||||
|
|
||||||
|
.link,
|
||||||
|
.button {
|
||||||
|
color: var(--Text-Brand-OnPrimary-1-Default);
|
||||||
|
}
|
||||||
|
|
||||||
|
.link:hover,
|
||||||
|
.button:not(.lastBreadcrumb):hover {
|
||||||
|
color: var(
|
||||||
|
--Text-Brand-OnPrimary-1-Default
|
||||||
|
); /* In need of a different variable for this */
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (width >= 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.mobile {
|
.mobile {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.desktop {
|
.desktop {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.breadcrumbs.isThemedDesktop {
|
||||||
|
background-color: var(--Surface-Brand-Primary-1-Default);
|
||||||
|
color: var(--Text-Brand-OnPrimary-1-Default);
|
||||||
|
|
||||||
|
.link,
|
||||||
|
.button {
|
||||||
|
color: var(--Text-Brand-OnPrimary-1-Default);
|
||||||
|
}
|
||||||
|
|
||||||
|
.link:hover,
|
||||||
|
.button:not(.lastBreadcrumb):hover {
|
||||||
|
color: var(
|
||||||
|
--Text-Brand-OnPrimary-1-Default
|
||||||
|
); /* In need of a different variable for this */
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { cx } from "class-variance-authority"
|
|||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
import {
|
import {
|
||||||
Breadcrumbs as AriaBreadcrumbs,
|
Breadcrumbs as BreadcrumbsRAC,
|
||||||
Button,
|
Button,
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogTrigger,
|
DialogTrigger,
|
||||||
@@ -30,6 +30,7 @@ export default function Breadcrumbs({
|
|||||||
breadcrumbs,
|
breadcrumbs,
|
||||||
color,
|
color,
|
||||||
size,
|
size,
|
||||||
|
isThemed,
|
||||||
}: BreadcrumbsProps) {
|
}: BreadcrumbsProps) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
|
|
||||||
@@ -63,6 +64,7 @@ export default function Breadcrumbs({
|
|||||||
const classNames = breadcrumbsVariants({
|
const classNames = breadcrumbsVariants({
|
||||||
color,
|
color,
|
||||||
size,
|
size,
|
||||||
|
isThemed,
|
||||||
})
|
})
|
||||||
|
|
||||||
const [homeBreadcrumb, remainingBreadcrumbs, lastBreadcrumb] =
|
const [homeBreadcrumb, remainingBreadcrumbs, lastBreadcrumb] =
|
||||||
@@ -76,16 +78,12 @@ export default function Breadcrumbs({
|
|||||||
})}
|
})}
|
||||||
className={classNames}
|
className={classNames}
|
||||||
>
|
>
|
||||||
<AriaBreadcrumbs className={styles.list}>
|
<BreadcrumbsRAC className={styles.list}>
|
||||||
<Breadcrumb
|
<Breadcrumb
|
||||||
href={homeBreadcrumb.href}
|
href={homeBreadcrumb.href}
|
||||||
aria-label={homeBreadcrumb.title}
|
aria-label={homeBreadcrumb.title}
|
||||||
>
|
>
|
||||||
<MaterialIcon
|
<MaterialIcon icon="home" size={20} color="CurrentColor" />
|
||||||
icon="home"
|
|
||||||
size={20}
|
|
||||||
color="Icon/Interactive/Secondary"
|
|
||||||
/>
|
|
||||||
</Breadcrumb>
|
</Breadcrumb>
|
||||||
|
|
||||||
{/* These breadcrumbs are visible on mobile only */}
|
{/* These breadcrumbs are visible on mobile only */}
|
||||||
@@ -125,7 +123,7 @@ export default function Breadcrumbs({
|
|||||||
icon="chevron_right"
|
icon="chevron_right"
|
||||||
size={20}
|
size={20}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
color="Icon/Interactive/Secondary"
|
color="CurrentColor"
|
||||||
/>
|
/>
|
||||||
</Breadcrumb>
|
</Breadcrumb>
|
||||||
</>
|
</>
|
||||||
@@ -157,7 +155,7 @@ export default function Breadcrumbs({
|
|||||||
<DialogTrigger>
|
<DialogTrigger>
|
||||||
<Typography variant="Label/xsBold">
|
<Typography variant="Label/xsBold">
|
||||||
<Button
|
<Button
|
||||||
className={cx(styles.button, styles.tooltipTrigger)}
|
className={cx(styles.button, styles.lastBreadcrumb)}
|
||||||
ref={attachRef}
|
ref={attachRef}
|
||||||
isDisabled={isTooltipDisabled}
|
isDisabled={isTooltipDisabled}
|
||||||
>
|
>
|
||||||
@@ -176,7 +174,7 @@ export default function Breadcrumbs({
|
|||||||
</Popover>
|
</Popover>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
</Breadcrumb>
|
</Breadcrumb>
|
||||||
</AriaBreadcrumbs>
|
</BreadcrumbsRAC>
|
||||||
</nav>
|
</nav>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,16 @@ export const breadcrumbsVariants = cva(styles.breadcrumbs, {
|
|||||||
headerWidth: styles.headerWidth,
|
headerWidth: styles.headerWidth,
|
||||||
contentWidth: styles.contentWidth,
|
contentWidth: styles.contentWidth,
|
||||||
},
|
},
|
||||||
|
isThemed: {
|
||||||
|
mobileOnly: styles.isThemedMobile,
|
||||||
|
desktopOnly: styles.isThemedDesktop,
|
||||||
|
true: [styles.isThemedMobile, styles.isThemedDesktop],
|
||||||
|
false: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
color: "transparent",
|
color: "transparent",
|
||||||
size: "pageWidth",
|
size: "pageWidth",
|
||||||
|
isThemed: false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Body from "@scandic-hotels/design-system/Body"
|
import Body from "@scandic-hotels/design-system/Body"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Title from "@scandic-hotels/design-system/Title"
|
import Title from "@scandic-hotels/design-system/Title"
|
||||||
|
|
||||||
import { loyaltyCardVariants } from "./variants"
|
import { loyaltyCardVariants } from "./variants"
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ export default function MeetingRoomCard({ room }: MeetingRoomCardProps) {
|
|||||||
</table>
|
</table>
|
||||||
)}
|
)}
|
||||||
<ShowMoreButton
|
<ShowMoreButton
|
||||||
intent="secondary"
|
variant="Secondary"
|
||||||
loadMoreData={handleShowMore}
|
loadMoreData={handleShowMore}
|
||||||
showLess={opened}
|
showLess={opened}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -2,30 +2,30 @@
|
|||||||
|
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
|
import { Button } from "@scandic-hotels/design-system/Button"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
|
||||||
|
|
||||||
import { showMoreButtonVariants } from "./variants"
|
import type { ComponentProps } from "react"
|
||||||
|
|
||||||
import styles from "./showMoreButton.module.css"
|
interface ShowMoreButtonProps extends ComponentProps<typeof Button> {
|
||||||
|
showLess?: boolean
|
||||||
import type { ShowMoreButtonProps } from "./showMoreButton"
|
textShowMore?: string
|
||||||
|
textShowLess?: string
|
||||||
|
loadMoreData: () => void
|
||||||
|
}
|
||||||
|
|
||||||
export default function ShowMoreButton({
|
export default function ShowMoreButton({
|
||||||
className,
|
variant = "Text",
|
||||||
buttonIntent,
|
color = "Primary",
|
||||||
intent,
|
size = "Medium",
|
||||||
disabled,
|
typography = "Body/Paragraph/mdBold",
|
||||||
showLess,
|
showLess,
|
||||||
textShowMore,
|
textShowMore,
|
||||||
textShowLess,
|
textShowLess,
|
||||||
loadMoreData,
|
loadMoreData,
|
||||||
|
...props
|
||||||
}: ShowMoreButtonProps) {
|
}: ShowMoreButtonProps) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const classNames = showMoreButtonVariants({
|
|
||||||
className,
|
|
||||||
buttonIntent,
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!textShowMore) {
|
if (!textShowMore) {
|
||||||
textShowMore = intl.formatMessage({
|
textShowMore = intl.formatMessage({
|
||||||
@@ -42,25 +42,25 @@ export default function ShowMoreButton({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${classNames} ${showLess ? styles.showLess : ""}`}>
|
<Button
|
||||||
<Button
|
variant={variant}
|
||||||
className={styles.button}
|
color={color}
|
||||||
disabled={disabled}
|
size={size}
|
||||||
onClick={loadMoreData}
|
onPress={loadMoreData}
|
||||||
variant="icon"
|
typography={typography}
|
||||||
type="button"
|
{...props}
|
||||||
theme="base"
|
>
|
||||||
intent={intent ?? "text"}
|
{showLess ? (
|
||||||
fullWidth={intent ? true : false}
|
<>
|
||||||
size={intent && "small"}
|
<MaterialIcon icon="keyboard_arrow_up" color="CurrentColor" />
|
||||||
>
|
<span>{textShowLess}</span>
|
||||||
<MaterialIcon
|
</>
|
||||||
icon="keyboard_arrow_down"
|
) : (
|
||||||
className={styles.icon}
|
<>
|
||||||
color="CurrentColor"
|
<MaterialIcon icon="keyboard_arrow_down" color="CurrentColor" />
|
||||||
/>
|
<span>{textShowMore}</span>
|
||||||
{showLess ? textShowLess : textShowMore}
|
</>
|
||||||
</Button>
|
)}
|
||||||
</div>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
.container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table {
|
|
||||||
display: grid;
|
|
||||||
justify-content: stretch;
|
|
||||||
border-top: 1px solid var(--Base-Border-Subtle);
|
|
||||||
background-color: var(--Base-Surface-Primary-light-Normal);
|
|
||||||
}
|
|
||||||
|
|
||||||
.table .button {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
transition: transform 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.showLess .icon {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
import type { ButtonPropsRAC } from "@scandic-hotels/design-system/OldDSButton"
|
|
||||||
import type { VariantProps } from "class-variance-authority"
|
|
||||||
|
|
||||||
import type { showMoreButtonVariants } from "./variants"
|
|
||||||
|
|
||||||
export interface ShowMoreButtonProps
|
|
||||||
extends React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>,
|
|
||||||
VariantProps<typeof showMoreButtonVariants> {
|
|
||||||
disabled?: boolean
|
|
||||||
showLess?: boolean
|
|
||||||
textShowMore?: string
|
|
||||||
textShowLess?: string
|
|
||||||
loadMoreData: () => void
|
|
||||||
intent?: ButtonPropsRAC["intent"]
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { cva } from "class-variance-authority"
|
|
||||||
|
|
||||||
import styles from "./showMoreButton.module.css"
|
|
||||||
|
|
||||||
export const showMoreButtonVariants = cva(styles.container, {
|
|
||||||
variants: {
|
|
||||||
buttonIntent: {
|
|
||||||
table: styles.table,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ArrowLeft } from "react-feather"
|
import { ArrowLeft } from "react-feather"
|
||||||
|
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import { overview } from "@/constants/routes/webviews"
|
import { overview } from "@/constants/routes/webviews"
|
||||||
import { env } from "@/env/server"
|
import { env } from "@/env/server"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import styles from "./hotelDetails.module.css"
|
import styles from "./hotelDetails.module.css"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Button } from "@scandic-hotels/design-system/Button"
|
import { Button } from "@scandic-hotels/design-system/Button"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import styles from "./promo.module.css"
|
import styles from "./promo.module.css"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { useIntl } from "react-intl"
|
|||||||
import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon"
|
import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon"
|
||||||
import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon"
|
import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import useLang from "../../hooks/useLang"
|
import useLang from "../../hooks/useLang"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
|
|||||||
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
||||||
import Footnote from "@scandic-hotels/design-system/Footnote"
|
import Footnote from "@scandic-hotels/design-system/Footnote"
|
||||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
|
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
|
|||||||
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
||||||
import Footnote from "@scandic-hotels/design-system/Footnote"
|
import Footnote from "@scandic-hotels/design-system/Footnote"
|
||||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
|
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import { useLazyPathname } from "@scandic-hotels/common/hooks/useLazyPathname"
|
|||||||
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
||||||
import Footnote from "@scandic-hotels/design-system/Footnote"
|
import Footnote from "@scandic-hotels/design-system/Footnote"
|
||||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { LoginButton } from "@scandic-hotels/design-system/LoginButton"
|
import { LoginButton } from "@scandic-hotels/design-system/LoginButton"
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { trackLoginClick } from "@scandic-hotels/tracking/navigation"
|
import { trackLoginClick } from "@scandic-hotels/tracking/navigation"
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
|
|||||||
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
||||||
import Footnote from "@scandic-hotels/design-system/Footnote"
|
import Footnote from "@scandic-hotels/design-system/Footnote"
|
||||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { trpc } from "@scandic-hotels/trpc/client"
|
import { trpc } from "@scandic-hotels/trpc/client"
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import Body from "@scandic-hotels/design-system/Body"
|
import Body from "@scandic-hotels/design-system/Body"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { LoadingSpinner } from "@scandic-hotels/design-system/LoadingSpinner"
|
import { LoadingSpinner } from "@scandic-hotels/design-system/LoadingSpinner"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
|
|
||||||
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
|
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useIntl } from "react-intl"
|
|||||||
|
|
||||||
import Caption from "@scandic-hotels/design-system/Caption"
|
import Caption from "@scandic-hotels/design-system/Caption"
|
||||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useBookingFlowConfig } from "../../../../bookingFlowConfig/bookingFlowConfigContext"
|
import { useBookingFlowConfig } from "../../../../bookingFlowConfig/bookingFlowConfigContext"
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import { HotelPointsRow } from "@scandic-hotels/design-system/HotelCard/HotelPoi
|
|||||||
import { NoPriceAvailableCard } from "@scandic-hotels/design-system/HotelCard/NoPriceAvailableCard"
|
import { NoPriceAvailableCard } from "@scandic-hotels/design-system/HotelCard/NoPriceAvailableCard"
|
||||||
import { IconButton } from "@scandic-hotels/design-system/IconButton"
|
import { IconButton } from "@scandic-hotels/design-system/IconButton"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import {
|
|||||||
selectHotelMap,
|
selectHotelMap,
|
||||||
} from "@scandic-hotels/common/constants/routes/hotelReservation"
|
} from "@scandic-hotels/common/constants/routes/hotelReservation"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
|
|
||||||
import useLang from "../../../hooks/useLang"
|
import useLang from "../../../hooks/useLang"
|
||||||
import FilterAndSortModal from "../Filters/FilterAndSortModal"
|
import FilterAndSortModal from "../Filters/FilterAndSortModal"
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import { debounce } from "@scandic-hotels/common/utils/debounce"
|
|||||||
import { BackToTopButton } from "@scandic-hotels/design-system/BackToTopButton"
|
import { BackToTopButton } from "@scandic-hotels/design-system/BackToTopButton"
|
||||||
import { Button } from "@scandic-hotels/design-system/Button"
|
import { Button } from "@scandic-hotels/design-system/Button"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/Link"
|
|
||||||
import { InteractiveMap } from "@scandic-hotels/design-system/Map/InteractiveMap"
|
import { InteractiveMap } from "@scandic-hotels/design-system/Map/InteractiveMap"
|
||||||
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
import { trackEvent } from "@scandic-hotels/tracking/base"
|
import { trackEvent } from "@scandic-hotels/tracking/base"
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user