-
- {intl.formatMessage(
- { id: "booking.roomIndex", defaultMessage: "Room {roomIndex}" },
- { roomIndex: roomNr }
- )}
-
+
+
+ {intl.formatMessage(
+ { id: "booking.roomIndex", defaultMessage: "Room {roomIndex}" },
+ { roomIndex: roomNr }
+ )}
+
+
{selectedRate.roomInfo.roomType}
diff --git a/packages/booking-flow/lib/components/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/RoomNotAvailable/index.tsx b/packages/booking-flow/lib/components/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/RoomNotAvailable/index.tsx
index e75173b07..0b55a194f 100644
--- a/packages/booking-flow/lib/components/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/RoomNotAvailable/index.tsx
+++ b/packages/booking-flow/lib/components/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/RoomNotAvailable/index.tsx
@@ -1,8 +1,8 @@
"use client"
import { useIntl } from "react-intl"
-import Caption from "@scandic-hotels/design-system/Caption"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
+import { Typography } from "@scandic-hotels/design-system/Typography"
import styles from "./notAvailable.module.css"
@@ -12,12 +12,14 @@ export default function RoomNotAvailable() {
-
- {intl.formatMessage({
- id: "selectRate.thisRoomIsNotAvailable",
- defaultMessage: "This room is not available",
- })}
-
+
+
+ {intl.formatMessage({
+ id: "selectRate.thisRoomIsNotAvailable",
+ defaultMessage: "This room is not available",
+ })}
+
+
)
diff --git a/packages/booking-flow/lib/components/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/RoomNotAvailable/notAvailable.module.css b/packages/booking-flow/lib/components/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/RoomNotAvailable/notAvailable.module.css
index e4dc06928..323fcb0aa 100644
--- a/packages/booking-flow/lib/components/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/RoomNotAvailable/notAvailable.module.css
+++ b/packages/booking-flow/lib/components/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/RoomNotAvailable/notAvailable.module.css
@@ -5,4 +5,5 @@
gap: var(--Space-x1);
margin: 0;
padding: var(--Space-x2);
+ align-items: center;
}
diff --git a/packages/booking-flow/lib/components/SignupPromo/Desktop.tsx b/packages/booking-flow/lib/components/SignupPromo/Desktop.tsx
index 44f3b8168..4046224f0 100644
--- a/packages/booking-flow/lib/components/SignupPromo/Desktop.tsx
+++ b/packages/booking-flow/lib/components/SignupPromo/Desktop.tsx
@@ -3,8 +3,8 @@
import { useIntl } from "react-intl"
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
-import Caption from "@scandic-hotels/design-system/Caption"
import Footnote from "@scandic-hotels/design-system/Footnote"
+import { Typography } from "@scandic-hotels/design-system/Typography"
import { useBookingFlowConfig } from "../../bookingFlowConfig/bookingFlowConfigContext"
@@ -63,9 +63,12 @@ function Message({
},
{
span: (str) => (
-
+
{str}
-
+
),
price,
}
@@ -81,9 +84,12 @@ function Message({
},
{
span: (str) => (
-
+
{str}
-
+
),
price,
}
@@ -98,9 +104,12 @@ function Message({
},
{
span: (str) => (
-
+
{str}
-
+
),
price,
}
diff --git a/packages/booking-flow/lib/components/SignupPromo/signupPromo.module.css b/packages/booking-flow/lib/components/SignupPromo/signupPromo.module.css
index b861995cc..2749bdfd7 100644
--- a/packages/booking-flow/lib/components/SignupPromo/signupPromo.module.css
+++ b/packages/booking-flow/lib/components/SignupPromo/signupPromo.module.css
@@ -18,6 +18,10 @@
position: relative;
}
+.red {
+ color: var(--Text-Accent-Primary);
+}
+
.badge {
display: flex;
align-items: center;
diff --git a/packages/design-system/lib/components/Caption/caption.module.css b/packages/design-system/lib/components/Caption/caption.module.css
deleted file mode 100644
index 973d9202b..000000000
--- a/packages/design-system/lib/components/Caption/caption.module.css
+++ /dev/null
@@ -1,127 +0,0 @@
-p.caption {
- margin: 0;
- padding: 0;
-}
-
-.captionFontOnly {
- font-style: normal;
-}
-
-.bold {
- font-family: var(--typography-Caption-Bold-fontFamily);
- font-size: var(--typography-Caption-Bold-fontSize);
- font-weight: 500; /* var(--typography-Caption-Bold-fontWeight); /* Commented till figma values are fixed to 500 instead of medium */
- letter-spacing: var(--typography-Caption-Bold-letterSpacing);
- line-height: var(--typography-Caption-Bold-lineHeight);
- text-decoration: var(--typography-Caption-Bold-textDecoration);
-}
-
-.labels {
- font-family: var(--typography-Caption-Labels-fontFamily);
- font-size: var(--typography-Caption-Labels-fontSize);
- font-weight: var(--typography-Caption-Labels-fontWeight);
- letter-spacing: var(--typography-Caption-Labels-letterSpacing);
- line-height: var(--typography-Caption-Labels-lineHeight);
- text-decoration: var(--typography-Caption-Labels-textDecoration);
-}
-
-.underline {
- font-family: var(--typography-Caption-Underline-fontFamily);
- font-size: var(--typography-Caption-Underline-fontSize);
- font-weight: var(--typography-Caption-Underline-fontWeight);
- letter-spacing: var(--typography-Caption-Underline-letterSpacing);
- line-height: var(--typography-Caption-Underline-lineHeight);
- text-decoration: underline; /* var(--typography-Caption-Underline-textDecoration) /* Commented till figma values are fixed to underline instead of "underline" */
-}
-
-.regular {
- font-family: var(--typography-Caption-Regular-fontFamily);
- font-size: var(--typography-Caption-Regular-fontSize);
- font-weight: var(--typography-Caption-Regular-fontWeight);
- letter-spacing: var(--typography-Caption-Regular-letterSpacing);
- line-height: var(--typography-Caption-Regular-lineHeight);
- text-decoration: var(--typography-Caption-Regular-textDecoration);
-}
-
-.uppercase {
- text-transform: uppercase;
-}
-
-.striked {
- text-decoration: line-through;
-}
-
-.baseTextAccent {
- color: var(--Base-Text-Accent);
-}
-
-.black {
- color: var(--Main-Grey-100);
-}
-
-.burgundy {
- color: var(--Scandic-Brand-Burgundy);
-}
-
-.pale {
- color: var(--Scandic-Brand-Pale-Peach);
-}
-
-.textMediumContrast {
- color: var(--Base-Text-Medium-contrast);
-}
-
-.baseTextHighContrast {
- color: var(--Base-Text-High-contrast);
-}
-
-.baseTextMediumContrast {
- color: var(--Base-Text-Medium-contrast);
-}
-
-.red {
- color: var(--Scandic-Brand-Scandic-Red);
-}
-
-.white {
- color: var(--UI-Opacity-White-100);
-}
-
-.uiTextActive {
- color: var(--UI-Text-Active);
-}
-
-.uiTextMediumContrast {
- color: var(--UI-Text-Medium-contrast);
-}
-
-.uiTextHighContrast {
- color: var(--UI-Text-High-contrast);
-}
-
-.uiTextPlaceholder {
- color: var(--UI-Text-Placeholder);
-}
-
-.disabled {
- color: var(--Base-Text-Disabled);
-}
-
-.center {
- text-align: center;
-}
-
-.left {
- text-align: left;
-}
-
-.right {
- text-align: right;
-}
-
-.green {
- color: var(--UI-Semantic-Success);
-}
-.blue {
- color: var(--UI-Semantic-Information);
-}
diff --git a/packages/design-system/lib/components/Caption/index.tsx b/packages/design-system/lib/components/Caption/index.tsx
deleted file mode 100644
index c8abb5914..000000000
--- a/packages/design-system/lib/components/Caption/index.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Slot } from "@radix-ui/react-slot"
-
-import { captionVariants, fontOnlycaptionVariants } from "./variants"
-import { VariantProps } from "class-variance-authority"
-
-interface CaptionProps
- extends
- Omit
, "color">,
- VariantProps {
- asChild?: boolean
- fontOnly?: boolean
-}
-
-/**
- * @deprecated Use `@scandic-hotels/design-system/Typography` instead.
- */
-export default function Caption({
- asChild = false,
- className = "",
- color,
- fontOnly = false,
- textAlign,
- textTransform,
- uppercase,
- striked,
- type,
- ...props
-}: CaptionProps) {
- const Comp = asChild ? Slot : "p"
- const classNames = fontOnly
- ? fontOnlycaptionVariants({
- className,
- textTransform,
- uppercase,
- striked,
- type,
- })
- : captionVariants({
- className,
- color,
- textTransform,
- textAlign,
- uppercase,
- striked,
- type,
- })
- return
-}
diff --git a/packages/design-system/lib/components/Caption/variants.ts b/packages/design-system/lib/components/Caption/variants.ts
deleted file mode 100644
index 2fb5caaae..000000000
--- a/packages/design-system/lib/components/Caption/variants.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import { cva } from "class-variance-authority"
-
-import styles from "./caption.module.css"
-
-const config = {
- variants: {
- type: {
- regular: styles.regular,
- bold: styles.bold,
- label: styles.labels,
- underline: styles.underline,
- },
- color: {
- baseTextAccent: styles.baseTextAccent,
- black: styles.black,
- burgundy: styles.burgundy,
- pale: styles.pale,
- textMediumContrast: styles.textMediumContrast,
- red: styles.red,
- white: styles.white,
- green: styles.green,
- blue: styles.blue,
- uiTextHighContrast: styles.uiTextHighContrast,
- uiTextActive: styles.uiTextActive,
- uiTextMediumContrast: styles.uiTextMediumContrast,
- uiTextPlaceholder: styles.uiTextPlaceholder,
- disabled: styles.disabled,
- baseTextHighContrast: styles.baseTextHighContrast,
- baseTextMediumContrast: styles.baseTextMediumContrast,
- },
- textTransform: {
- uppercase: styles.uppercase,
- },
- textAlign: {
- center: styles.center,
- left: styles.left,
- right: styles.right,
- },
- uppercase: {
- true: styles.uppercase,
- },
- striked: {
- true: styles.striked,
- },
- },
- defaultVariants: {
- color: "black",
- type: "regular",
- },
-} as const
-
-export const captionVariants = cva(styles.caption, config)
-
-const fontOnlyConfig = {
- variants: {
- type: {
- regular: styles.regular,
- bold: styles.bold,
- label: styles.labels,
- underline: styles.underline,
- },
- textTransform: {
- uppercase: styles.uppercase,
- },
- uppercase: {
- true: styles.uppercase,
- },
- striked: {
- true: styles.striked,
- },
- },
- defaultVariants: {
- type: "regular",
- },
-} as const
-
-export const fontOnlycaptionVariants = cva(
- styles.captionFontOnly,
- fontOnlyConfig
-)
diff --git a/packages/design-system/lib/components/HotelCard/HotelChequeCard/hotelChequeCard.module.css b/packages/design-system/lib/components/HotelCard/HotelChequeCard/hotelChequeCard.module.css
index 73df8f475..a113831e6 100644
--- a/packages/design-system/lib/components/HotelCard/HotelChequeCard/hotelChequeCard.module.css
+++ b/packages/design-system/lib/components/HotelCard/HotelChequeCard/hotelChequeCard.module.css
@@ -17,6 +17,10 @@
color: var(--Text-Default);
}
+.secondaryText {
+ color: var(--Text-Secondary);
+}
+
.cheque {
justify-content: end;
}
diff --git a/packages/design-system/lib/components/HotelCard/HotelChequeCard/index.tsx b/packages/design-system/lib/components/HotelCard/HotelChequeCard/index.tsx
index e7f361a18..9a5eb3e27 100644
--- a/packages/design-system/lib/components/HotelCard/HotelChequeCard/index.tsx
+++ b/packages/design-system/lib/components/HotelCard/HotelChequeCard/index.tsx
@@ -1,7 +1,6 @@
import { useIntl } from "react-intl"
import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
-import Caption from "../../Caption"
import styles from "./hotelChequeCard.module.css"
import { Typography } from "../../Typography"
@@ -28,17 +27,21 @@ export default function HotelChequeCard({
return (
-
- {intl.formatMessage({
- id: "common.from",
- defaultMessage: "From",
- })}
-
+
+
+ {intl.formatMessage({
+ id: "common.from",
+ defaultMessage: "From",
+ })}
+
+
{productTypeCheque.localPrice.numberOfCheques}
-
{CurrencyEnum.CC}
+
+ {CurrencyEnum.CC}
+
{productTypeCheque.localPrice.additionalPricePerStay > 0 ? (
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
<>
@@ -46,9 +49,9 @@ export default function HotelChequeCard({
{productTypeCheque.localPrice.additionalPricePerStay}
-
- {productTypeCheque.localPrice.currency}
-
+
+ {productTypeCheque.localPrice.currency}
+
>
) : null}
@@ -56,21 +59,33 @@ export default function HotelChequeCard({
{productTypeCheque.requestedPrice &&
productTypeCheque.requestedPrice.additionalPricePerStay > 0 ? (
-
- {intl.formatMessage({
- id: "booking.approx",
- defaultMessage: "Approx.",
- })}
-
-
- {productTypeCheque.requestedPrice.numberOfCheques} {CurrencyEnum.CC}
- {productTypeCheque.requestedPrice.additionalPricePerStay
- ? // eslint-disable-next-line formatjs/no-literal-string-in-jsx
- " + "
- : ""}
- {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
- {`${productTypeCheque.requestedPrice.additionalPricePerStay} ${productTypeCheque.requestedPrice.currency}`}
-
+
+
+ {intl.formatMessage({
+ id: "booking.approx",
+ defaultMessage: "Approx.",
+ })}
+
+
+
+
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
+ {productTypeCheque.requestedPrice.numberOfCheques}{" "}
+ {CurrencyEnum.CC}
+ {productTypeCheque.requestedPrice.additionalPricePerStay
+ ? // eslint-disable-next-line formatjs/no-literal-string-in-jsx
+ " + "
+ : ""}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
+ {`${productTypeCheque.requestedPrice.additionalPricePerStay} ${productTypeCheque.requestedPrice.currency}`}
+
+
) : null}
diff --git a/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/index.tsx b/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/index.tsx
index 85c14f5ba..320af8c17 100644
--- a/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/index.tsx
+++ b/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/index.tsx
@@ -151,7 +151,20 @@ export function StandaloneHotelCardDialog({
) : null}
{voucherPrice ? (
-
+
) : null}
{/* Show public price if:
1) user is not logged in, or
diff --git a/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx b/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx
index a9862d59c..f16f7b1b5 100644
--- a/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx
+++ b/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx
@@ -1,7 +1,5 @@
import { useIntl } from "react-intl"
-import Caption from "../../Caption"
-
import styles from "./hotelVoucherCard.module.css"
import { Typography } from "../../Typography"
@@ -18,28 +16,32 @@ export default function HotelVoucherCard({
return (
-
- {intl.formatMessage({
- id: "common.from",
- defaultMessage: "From",
- })}
-
+
+
+ {intl.formatMessage({
+ id: "common.from",
+ defaultMessage: "From",
+ })}
+
+
{productTypeVoucher.numberOfVouchers}
-
- {intl.formatMessage(
- {
- id: "price.numberOfVouchers",
- defaultMessage:
- "{numberOfVouchers, plural, one {Voucher} other {Vouchers}}",
- },
- {
- numberOfVouchers: productTypeVoucher.numberOfVouchers,
- }
- )}
-
+
+
+ {intl.formatMessage(
+ {
+ id: "price.numberOfVouchers",
+ defaultMessage:
+ "{numberOfVouchers, plural, one {Voucher} other {Vouchers}}",
+ },
+ {
+ numberOfVouchers: productTypeVoucher.numberOfVouchers,
+ }
+ )}
+
+
diff --git a/packages/design-system/lib/components/HotelCard/index.tsx b/packages/design-system/lib/components/HotelCard/index.tsx
index cd00cd2da..0edc8cd29 100644
--- a/packages/design-system/lib/components/HotelCard/index.tsx
+++ b/packages/design-system/lib/components/HotelCard/index.tsx
@@ -12,7 +12,6 @@ import {
selectRate,
} from "@scandic-hotels/common/constants/routes/hotelReservation"
import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting"
-import Caption from "../Caption"
import { Divider } from "../Divider"
import { FacilityToIcon } from "../FacilityToIcon"
import HotelLogoIcon from "../Icons/Logos"
@@ -341,12 +340,14 @@ export const HotelCardComponent = memo(
)}
{prices?.redemptions?.length ? (
-
- {intl.formatMessage({
- id: "hotelCard.availableRates",
- defaultMessage: "Available rates",
- })}
-
+
+
+ {intl.formatMessage({
+ id: "hotelCard.availableRates",
+ defaultMessage: "Available rates",
+ })}
+
+
{prices.redemptions.map((redemption) => (
-
{leftImage.meta.caption}
+
+ {leftImage.meta.caption}
+
- {rightImage.meta.caption}
+
+ {rightImage.meta.caption}
+
)
diff --git a/packages/design-system/lib/components/Switch/index.tsx b/packages/design-system/lib/components/Switch/index.tsx
index c3539ac6a..14ff1b0d4 100644
--- a/packages/design-system/lib/components/Switch/index.tsx
+++ b/packages/design-system/lib/components/Switch/index.tsx
@@ -5,7 +5,7 @@ import { RegisterOptions, useController, useFormContext } from "react-hook-form"
import styles from "./switch.module.css"
import { MaterialIcon } from "../Icons/MaterialIcon"
-import Caption from "../Caption"
+import { Typography } from "../Typography"
interface SwitchProps extends React.InputHTMLAttributes
{
name: string
@@ -37,10 +37,12 @@ export default function Switch({
{children}
{fieldState.error ? (
-
-
- {fieldState.error.message}
-
+
+
+
+ {fieldState.error.message}
+
+
) : null}
)
diff --git a/packages/design-system/package.json b/packages/design-system/package.json
index a619e9c07..42dd72587 100644
--- a/packages/design-system/package.json
+++ b/packages/design-system/package.json
@@ -14,7 +14,6 @@
"./Button": "./lib/components/Button/index.tsx",
"./ButtonLink": "./lib/components/ButtonLink/index.tsx",
"./CampaignRateCard": "./lib/components/RateCard/Campaign/index.tsx",
- "./Caption": "./lib/components/Caption/index.tsx",
"./Card": "./lib/components/Card/index.tsx",
"./ChipButton": "./lib/components/ChipButton/index.tsx",
"./ChipLink": "./lib/components/ChipLink/index.tsx",